toFloatRgba abstract method

Float32x4 toFloatRgba(
  1. P pixel
)

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

Float32x4 toFloatRgba(P pixel);