Graphics::fillRect

Description

void Graphics::fillRect( int16_t x , int16_t y , int16_t w , int16_t h )

Graphics::fillRect draws a filled rectangle to the screen/image/whatever, starting from (x, y) and with a certain width and height.

Parameters

  • int16_t x: x-coordinate of the rectangle
  • int16_t y: y-coordinate of the rectangle
  • int16_t w: width of the rectangle
  • int16_t h: height of the rectangle

Returns

none

Example

#include <Gamebuino-Meta.h>

void setup() { gb.begin(); }

void loop() { while(!gb.update()); gb.display.clear();

// draw a green rectangle gb.display.setColor(GREEN); gb.display.fillRect(10, 10, 20, 5); }