drawRect method

Future<void> drawRect(
  1. int x,
  2. int y,
  3. int w,
  4. int h,
  5. PaletteColors color,
)

Draws a rectangle on the display.

Args: x (int): The left pixel position of the rectangle. y (int): The top pixel position of the rectangle. w (int): The width of the rectangle. h (int): The height of the rectangle. color (PaletteColors): The color of the rectangle.

Implementation

Future<void> drawRect(int x, int y, int w, int h, PaletteColors color) async {
  await frame.runLua(
    _drawRectLua(x, y, w, h, color),
    checked: true,
  );
}