Draw_Ellipse

Draw_Ellipse(X1, Y1, X2, Y2, Color, Filled)

 

Draw_Ellipse is a call that draws an ellipse inscribed in the rectangle whose two diagonally opposite corners are given.  Draw_Ellipse has 6 required parameters:

 

(X1,Y1) is any corner of the rectangle.

(X2,Y2) the opposite corner of the rectangle.

 

 

Color specifies a color.

Filled can be either True (also Filled or Yes) or False (also Unfilled or No). If True, the ellipse will be filled in with the given color. If False, the ellipse will be drawn with no internal fill.

 

Note:  A graphics window must be open when Draw_Ellipse is called or a run-time error will occur.

 

Examples:

 

Draw_Ellipse(50,150,250,25,Green,True)

 

draws a solid green ellipse inscribed in the rectangle with upper left corner at (50,150) and lower right corner at (250,25). Note that the programmer may also specify the lower left and upper right corners (not necessarily in that order) as shown in the example below, in which the ellipse is drawn in the same location as the ellipse above, but is not filled:

 

Draw_Ellipse(250,150,50,25,Green,False)

 

 

Draw_Ellipse_Rotate

 

Draw_Ellipse(X1, Y1, X2, Y2, Angle, Color, Filled)

 

This procedure works exactly like Draw_Ellipse, except the drawn ellipse is rotated counter-clockwise by the specified angle.  The angle must be specified in radians (e.g., 90 degrees would be specified as pi/2).

 

Example:

 

Draw_Ellipse_Rotate(50,150,250,25,pi/2,Green,True)

 

draws a solid green ellipse inscribed in the rectangle with upper left corner at (50,150) and lower right corner at (250,25) and then rotated about the center counter-clockwise by 90 degrees.