getPixel method

Pixel getPixel(
  1. int x,
  2. int y, [
  3. Pixel? pixel
])

Return the Pixel at the given coordinates. If pixel is provided, it will be updated and returned rather than allocating a new Pixel.

Implementation

Pixel getPixel(int x, int y, [Pixel? pixel]) =>
    data?.getPixel(x, y, pixel) ?? Pixel.undefined;