setPixel method

void setPixel(
  1. int x,
  2. int y,
  3. int p
)

Sets a pixels at (x,y) with value p.

  • p is expected to be in the same format of this instances pixels.

Implementation

void setPixel(int x, int y, int p) => pixels[pixelIndex(x, y)] = p;