getPixelSafe method
Get the pixel from the given x
, y
coordinate. Color is encoded in a
Uint32 as #AABBGGRR. If the pixel coordinates are out of bounds, 0 is
returned.
Implementation
int getPixelSafe(int x, int y) => boundsSafe(x, y) ? data[y * width + x] : 0;