fillFromUnsafe method

  1. @override
void fillFromUnsafe(
  1. Iterable<Float32x4> pixels, [
  2. Rect? target
])
inherited

Fill the buffer with the given pixels.

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

If the number of pixels in the iterable is less than the number of pixels in the target rectangle, or if the number of pixels is greater, the behavior is undefined.

Example

final pixels = IntPixels(2, 2);
pixels.fillWithUnsafe([0xFFFFFFFF, 0x00000000]);
pixels.fillWithUnsafe([0x00000000, 0xFFFFFFFF], target: Rect.fromLTWH(1, 0, 1, 2));

Implementation

@override
void fillFromUnsafe(Iterable<T> pixels, [Rect? target]) {
  lodim.fillRectFromLinear(data, pixels, width: width, bounds: target);
}