setPixel method Null safety
Set the pixel at the given x
, y
coordinate to the color
.
No range checking is done.
Implementation
void setPixel(int x, int y, int color) {
data[y * width + x] = color;
}
Set the pixel at the given x
, y
coordinate to the color
.
No range checking is done.
void setPixel(int x, int y, int color) {
data[y * width + x] = color;
}