Palette class abstract

Implementers

Constructors

Palette(int numColors, int numChannels)

Properties

buffer ByteBuffer
The byte buffer storage of the palette data.
no setter
format Format
The format of the color data.
no setter
hashCode int
The hash code for this object.
no setterinherited
lengthInBytes int
The size of the palette data in bytes.
no setter
maxChannelValue num
no setter
numChannels int
The number of channels per color.
final
numColors int
The number of colors stored in the palette.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clone() Palette
Create a copy of the Palette.
get(int index, int channel) num
Get the the value of a specific channel of the palette entry at index. If the palette has fewer colors than index or fewer channels than channel, 0 will be returned.
getAlpha(int index) num
Get the alpha channel of the palette entry at index. If the palette has fewer colors or channels, 0 will be returned.
getBlue(int index) num
Get the blue channel of the palette entry at index. If the palette has fewer colors or channels, 0 will be returned.
getGreen(int index) num
Get the green channel of the palette entry at index. If the palette has fewer colors or channels, 0 will be returned.
getRed(int index) num
Get the red channel of the palette entry at index. If the palette has fewer colors or channels, 0 will be returned.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(int index, int channel, num value) → void
Set a specific channel value of the palette entry at index. If the palette has fewer channels than channel, the value will be ignored.
setAlpha(int index, num value) → void
Set the alpha channel of the palette entry at index. If the palette has fewer colors or channels, it will be ignored.
setBlue(int index, num value) → void
Set the blue channel of the palette entry at index. If the palette has fewer colors or channels, it will be ignored.
setGreen(int index, num value) → void
Set the green channel of the palette entry at index. If the palette has fewer colors or channels, it will be ignored.
setRed(int index, num value) → void
Set the red channel of the palette entry at index. If the palette has fewer colors or channels, it will be ignored.
setRgb(int index, num r, num g, num b) → void
Set the RGB color of a palette entry at index. If the palette has fewer channels than are set, the unsupported channels will be ignored.
setRgba(int index, num r, num g, num b, num a) → void
Set the RGBA color of a palette entry at index. If the palette has fewer channels than are set, the unsupported channels will be ignored.
toString() String
A string representation of this object.
inherited
toUint8List() Uint8List
A Uint8List view of the palette buffer storage.

Operators

operator ==(Object other) bool
The equality operator.
inherited