fillUnsafe method

  1. @override
void fillUnsafe(
  1. Float32x4 pixel, [
  2. Rect? target
])
inherited

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

@override
void fillUnsafe(T pixel, [Rect? target]) {
  lodim.fillRectLinear(data, pixel, width: width, bounds: target);
}