fillUnsafe abstract method

  1. @unsafeNoBoundsChecks
void fillUnsafe(
  1. T pixel, [
  2. Rect? target
])

Fill the buffer with the given pixel.

This is equivalent to calling setUnsafe for every pixel in the buffer.

If a target rectangle is provided, only the pixels within that rectangle will be filled. If the rectangle is outside the bounds of the buffer, the behavior is undefined.

Example

final pixels = IntPixels(2, 2);
pixels.fillUnsafe(0xFFFFFFFF);
pixels.fillUnsafe(0x00000000, Rect.fromLTWH(1, 0, 1, 2));

Implementation

@unsafeNoBoundsChecks
void fillUnsafe(T pixel, [Rect? target]);