bufferFillRect method
void
bufferFillRect()
Fills a rectangular region.
Implementation
void bufferFillRect(
OptimizedBufferHandle buffer,
int x,
int y,
int width,
int height,
Color background,
) {
_checkUnsignedAbi(x, 0xFFFFFFFF, 'x');
_checkUnsignedAbi(y, 0xFFFFFFFF, 'y');
_checkUnsignedAbi(width, 0xFFFFFFFF, 'width');
_checkUnsignedAbi(height, 0xFFFFFFFF, 'height');
validateColorChannels(background, name: 'background');
_guardAlloc('Failed to fill rectangle', (allocator) {
_native.bufferFillRect(
buffer.value,
x,
y,
width,
height,
_colorToNative(background, allocator),
);
});
}