Bypass navigation menu
RGB Classic Games
Keeping the classics alive
Currently hosting 566 great games!
Return to Chapter 2

Ellipse(X, Y, MajorAxis, MinorAxis)

Draws an ellipse centered at the specified X, Y position using the specified major and minor axes and current drawing color.

When you draw a circle you specify an X, Y center along with a radius. The radius is a single number that indicates how many points away from the center the circle should expand out. The radius is in fact broken down into two separate numbers; a number of horizontal and vertical points. These numbers are derived from the current setting of the aspect ratio. The horizontal and vertical number of points are called the major and minor axes of the ellipse. Using the aspect ratio to break down the radius into these two parts has its limitations. Calling the ellipse procedure with the specified major and minor axes gives you the ultimate control in drawing circular shapes.

Parameters

X - Horizontal center of ellipse
Y - Vertical center of ellipse
MajorAxis - Size of major axis
MinorAxis - Size of minor axis

Examples

BASIC

CALL Ellipse(160, 100, 50, 40)

PASCAL

Ellipse(160, 100, 50, 40);

BGI equivalent

void ellipse(int x, int y, int stangle, int endangle, int xradius, int yradius);