fillFromUnsafe abstract method

  1. @unsafeNoBoundsChecks
void fillFromUnsafe(
  1. Iterable<T> pixels, [
  2. Rect? target
])

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

@unsafeNoBoundsChecks
void fillFromUnsafe(Iterable<T> pixels, [Rect? target]);