Graphics Function: Draws a circle or an ellipse using the current graphics color.
Module: USE DFLIB
Syntax
Results:
The result is of type INTEGER(2). The result is nonzero if successful; otherwise, 0. If the ellipse is clipped or partially out of bounds, the ellipse is considered successfully drawn, and the return is 1. If the ellipse is drawn completely out of bounds, the return is 0.
The border is drawn in the current color and line style.
When you use ELLIPSE, the center of the ellipse is the center of the bounding rectangle defined by the viewport-coordinate points (x1, y1) and (x2, y2). When you use ELLIPSE_W, the center of the ellipse is the center of the bounding rectangle defined by the window-coordinate points (wx1, wy1) and (wx2, wy2). If the bounding-rectangle arguments define a point or a vertical or horizontal line, no figure is drawn.
The control option given by $GFILLINTERIOR is equivalent to a subsequent call to the FLOODFILLRGB function using the center of the ellipse as the start point and the current color (set by SETCOLORRGB) as the boundary color.
Compatibility
STANDARD GRAPHICS QUICKWIN GRAPHICS LIB
See Also: ARC, FLOODFILLRGB, GRSTATUS, LINETO, PIE, POLYGON, RECTANGLE, SETCOLORRGB, SETFILLMASK
Example
This program draws the shape shown below.
! compile as QuickWin or Standard Graphics application
USE DFLIB
INTEGER(2) dummy, x1, y1, x2, y2
x1 = 80; y1 = 50
x2 = 240; y2 = 150
dummy = ELLIPSE( $GFILLINTERIOR, x1, y1, x2, y2 )
END
Figure: Output of Program ELLIPSE.FOR