toAbgr8888 method
- int pixel
override
Converts a pixel in this
pixel format to the abgr8888 pixel format.
ABGR8888 is used as the canonical integer-based 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(abgr8888.toAbgr8888(floatRgba.red)); // 0xFFFF0000
print(abgr8888.toAbgr8888(floatRgba.white)); // 0xFFFFFFFF
Implementation
@override
int toAbgr8888(int pixel) {
return _format.toAbgr8888(_lookupByIndex(pixel));
}