Skip to main content

Ellipse

Ellipse (Statement)

Format

ellipse x_position, y_position, width, height
ellipse ( x_position, y_position, width, height )

Description

Draws an ellipse using the current pen and brush colors. The ellipse fills the width x height pixel rectangle whose top left corner is at x_position,y_position — the same bounding box that Rect would draw.

The outline is drawn in the current pen color and thickness (see PenWidth) and the interior is filled with the current brush color (see Color). Use a brush color of CLEAR to draw an un-filled ellipse.

When width and height are equal the result is a circle. Note that Circle is positioned by its center point and radius, while ellipse is positioned by the top left corner of a bounding box.

Example

clg

color red
ellipse 75,75,150,75

penwidth 5
color orange, yellow
ellipse 120,120,200,100

penwidth 10
color blue, clear
ellipse 200,200,120,60

draws
Ellipse

See Also

Arc, Chord, Circle, GetPenWidth, Line, PenWidth, Pie, Plot, Poly, Rect, Stamp

Availability

Present in BASIC-256 but not previously documented. Described here from the BASIC-256 v2.1 continuation project source.