drawOval()

[Graphics]
void drawOval (int x, int y, int width, int height);

Description

Draws an oval on the chip.

Parameters

x: the x-coordinate of the center of the oval.

y: the y-coordinate of the center of the oval.

width: the width of the oval.

height: the height of the oval.

Returns

Nothing.

Example Code

The code draws an oval in the center of the chip, with a width of 10 pixels and a height of 20 pixels.

void setup() {
    int width = chipWidth();   // gets the width of the chip
    int height = chipHeight(); // gets the height of the chip
    
    // draws an oval in the center of the chip, with a
    // width of 10 pixels and a height of 20 pixels
    drawOval(width / 2, height / 2, 10, 20);
}

void loop() {
}

Notes and Warnings

All coordinates must be inside the chip boundaries, use the functions chipWidth() and chipHeight() to get the chip dimensions.