Rgb<P, C> class
abstract
final
Pixel Formats
Base API for pixel formats that have red, green, and blue channels.
Additional RGBA-specific methods are provided:
- copyWith and copyWithNormalized for replacing channel values;
- maxRed, maxGreen, and maxBlue for the maximum channel values;
- black, white, red, green, blue, yellow, cyan, and magenta for common colors.
In addition, fromFloatRgba is implemented using copyWithNormalized.
- Inheritance
-
- Object
- PixelFormat<
P, C> - Rgb
- Implementers
Properties
- black → P
-
Black color with full transparency.
no setter
- blue → P
-
Blue color with full transparency.
no setter
- bytesPerPixel → int
-
Number of bytes required to store a single pixel in memory.
no setterinherited
- cyan → P
-
Cyan color with full transparency.
no setter
- green → P
-
Green color with full transparency.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- magenta → P
-
Magenta color with full transparency.
no setter
- max → P
-
The maximum value for the pixel format.
no setterinherited
- maxBlue → C
-
The maximum value for the blue channel.
no setter
- maxGreen → C
-
The maximum value for the green channel.
no setter
- maxRed → C
-
The maximum value for the red channel.
no setter
- minBlue → C
-
The minimum value for the blue channel.
no setter
- minGreen → C
-
The minimum value for the green channel.
no setter
- minRed → C
-
The minimum value for the red channel.
no setter
- name → String
-
Human-readable name or description of the pixel format.
no setterinherited
- red → P
-
Red color with full transparency.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- white → P
-
White color with full transparency.
no setter
- yellow → P
-
Yellow color with full transparency.
no setter
- zero → P
-
The zero, or minimum, value for the pixel format.
no setterinherited
Methods
-
clamp(
P pixel) → P -
Clamps a
pixel
to the valid range of values for the pixel format.inherited -
compare(
P a, P b) → double -
Compares two pixels in the pixel format.
inherited
-
convert<
R> (R pixel, {required PixelFormat< R, void> from}) → P -
Converts a pixel
from
one another format tothis
format.inherited -
copyWith(
P pixel, {C? red, C? green, C? blue}) → P -
Returns a copy of the
pixel
.override -
copyWithNormalized(
P pixel, {double? red, double? green, double? blue}) → P -
Returns a copy of the
pixel
with normalized values.override -
create(
{C? red, C? green, C? blue}) → P - Creates a new pixel with the given channel values.
-
createNormalized(
{double red = 0.0, double green = 0.0, double blue = 0.0}) → P -
Creates a new pixel with the given channel values normalized to the range
[0.0, 1.0]
. -
describe(
P pixel) → String -
Returns a human-readable description of the pixel.
inherited
-
distance(
P a, P b) → double -
Returns the distance between two pixels in the pixel format.
inherited
-
fromAbgr8888(
int pixel) → P -
Converts a pixel in the abgr8888 pixel format to
this
pixel format.inherited -
fromFloatRgba(
Float32x4 pixel) → P -
Converts a pixel in the floatRgba pixel format to
this
pixel format.inherited -
getBlue(
P pixel) → C -
Returns the blue channel value of the
pixel
. -
getGreen(
P pixel) → C -
Returns the green channel value of the
pixel
. -
getRed(
P pixel) → C -
Returns the red channel value of the
pixel
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toAbgr8888(
P pixel) → int -
Converts a pixel in
this
pixel format to the abgr8888 pixel format.inherited -
toFloatRgba(
P pixel) → Float32x4 -
Converts a pixel in
this
pixel format to the floatRgba pixel format.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited