ArduinoGraphics - rect()

Description

Stroke and fill a rectangle, uses the stroke color set in stroke() and the fill color set in fill().

Syntax

YourScreen.rect(x, y, width, height)

Parameters

  • x: x position of the rectangle
  • y: y position of the rectangle
  • width: width of the rectangle
  • height: height of the rectangle

Returns

Nothing

Example

YourScreen.beginDraw();
YourScreen.clear();
YourScreen.noStroke();
YourScreen.fill(255, 255, 0);
YourScreen.rect(0, 0, YourScreen.width(), YourScreen.height());
YourScreen.endDraw();