Graphics::drawRoundRect

Description

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

Graphics::drawRoundRect draws a 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() { while(!gb.update()); gb.display.clear();

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