getPixel method
Return the Pixel at the given coordinates. If pixel
is provided,
it will be updated and returned rather than allocating a new Pixel.
Implementation
@override
Pixel getPixel(int x, int y, [Pixel? pixel]) {
if (pixel == null || pixel is! PixelUint4 || pixel.image != this) {
pixel = PixelUint4.imageData(this);
}
pixel.setPosition(x, y);
return pixel;
}