Grayscale<P, C> mixin base Pixel Formats

A mixin for pixel formats that represent graysacle pixels.

Implemented types
Mixin Applications

Properties

black → P
Black pixel.
no setter
bytesPerPixel int
Number of bytes required to store a single pixel in memory.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
max → P
The maximum value for the pixel format.
no setterinherited
maxGray → C
The maximum value for the gray channel.
no setter
minGray → C
The minimum value for the gray channel.
no setter
name String
Human-readable name or description of the pixel format.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
white → P
White pixel.
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 to this format.
inherited
copyWith(P pixel, {C? gray}) → P
Returns a copy of the pixel.
override
copyWithNormalized(P pixel, {double? gray}) → P
Returns a copy of the pixel with normalized values.
override
create({C? gray}) → P
Creates a new pixel with the given channel values.
createNormalized({double gray = 0.0}) → P
Creates a new pixel with the given channel value 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.
override
getGray(P pixel) → C
Returns the gray 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