fillRect method
Fills a rectangular region with solid background color.
This is very efficient for drawing solid areas, panels, and backgrounds. Use this instead of multiple setCell calls for better performance.
Example:
// Fill a 20x10 panel background
buffer.fillRect(5, 2, 20, 10, Color.darkGray);
// Create a progress bar
final progress = 0.7; // 70%
buffer.fillRect(10, 8, (progress * 30).round(), 1, Color.green);
Implementation
void fillRect(int x, int y, int width, int height, Color color) {
_checkValid();
_bindings.bufferFillRect(_ptr, x, y, width, height, color);
}