Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

ELLIPSE, ELLIPSE_W

Graphics Functions: Draw a circle or an ellipse using the current graphics color. These routines are only available for Windows.

Module

USE IFQWIN

result = ELLIPSE (control,x1,y1,x2,y2)

result = ELLIPSE_W (control,wx1,wy1,wx2,wy2)

control

(Input) INTEGER(2). Fill flag. Can be one of the following symbolic constants:

  • $GFILLINTERIOR - Fills the figure using the current color and fill mask.

  • $GBORDER - Does not fill the figure.

x1, y1

(Input) INTEGER(2). Viewport coordinates for upper-left corner of bounding rectangle.

x2, y2

(Input) INTEGER(2). Viewport coordinates for lower-right corner of bounding rectangle.

wx1, wy1

(Input) REAL(8). Window coordinates for upper-left corner of bounding rectangle.

wx2, wy2

(Input) REAL(8). Window coordinates for lower-right corner of bounding rectangle.

Results

The result type is 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.

NOTE:

The ELLIPSE routine described here is a QuickWin routine. If you are trying to use the Microsoft* Platform SDK version of the Ellipse routine by including the IFWIN module, you need to specify the routine name as MSFWIN$Ellipse.

Example

The following program draws the shape shown below.

! compile as QuickWin or Standard Graphics application
 USE IFQWIN
 INTEGER(2) dummy, x1, y1, x2, y2
 x1 = 80;  y1 = 50
 x2 = 240; y2 = 150
 dummy = ELLIPSE( $GFILLINTERIOR, x1, y1, x2, y2 )
 END