bufferFillRect method

void bufferFillRect(
  1. Pointer<OptimizedBufferHandle> buffer,
  2. int x,
  3. int y,
  4. int width,
  5. int height,
  6. Color bg,
)

Fills the width×height rectangle at (x,y) in buffer with the bg color. Throws FFIException on failure.

Implementation

void bufferFillRect(
  Pointer<OptimizedBufferHandle> buffer,
  int x,
  int y,
  int width,
  int height,
  Color bg,
) {
  _guardAlloc('Failed to fill rect', (alloc) {
    _generated.bufferFillRect(
      buffer.cast(),
      x,
      y,
      width,
      height,
      bg.toNative(alloc),
    );
  });
}