toFloatRgba method

  1. @override
Float32x4 toFloatRgba(
  1. Float32x4 pixel
)
override

Converts a pixel in this pixel format to the floatRgba pixel format.

FLOAT_RGBA is used as the canonical floating-point pixel format, and this method guarantees that all pixel formats can be converted to it. Loss of precision may occur when this pixel format has higher precision.

Example

print(floatRgba.toFloatRgba(abgr8888.red)); // [1.0, 0.0, 0.0, 1.0]
print(floatRgba.toFloatRgba(abgr8888.white)); // [1.0, 1.0, 1.0, 1.0]

Implementation

@override
Float32x4 toFloatRgba(Float32x4 pixel) => pixel;