Graphics::fillRoundRect

Description

void Graphics::fillRoundRect( int16_t x , int16_t y , int16_t w , int16_t h , int16_t r )

Graphics::fillRoundRect draws a filled rectangle at (x, y) with width w and height h whose corners are rounded with the radius r.

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
  • int16_t r: radius of the corners

Returns

none

Example

#include <Gamebuino-Meta.h>

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

void loop() {
  if (gb.update()) {
    gb.display.clear();

    // draw a yellow rectangle with round corners
    gb.display.setColor(YELLOW);
    gb.display.fillRoundRect(5, 5, 42, 20, 5);
  }
}