XPRINT ELLIPSE statement

Purpose

Draw an ellipse or a circle on a host printer page.

Syntax

XPRINT ELLIPSE (x1!, y1!) - (x2!, y2!) [, [rgbColor&] [, [fillcolor&] [, [fillstyle&]]]]

Remarks

A host printer must first be connected with XPRINT ATTACH.  The coordinate points are specified in pixels  (or world coordinates, if those were defined with an XPRINT SCALE statement).  Line width can be set using XPRINT WIDTH.  If line width is set to 1 (the default), the line style can be set with XPRINT STYLE.  Because of the nature of an ellipse, which has no obvious beginning or end, XPRINT ELLIPSE neither uses, nor updates, the last point referenced (POS).  If executed without a host printer attached, error 57 is generated.

x1!, y1!

The upper left corner of the bounding rectangle.

x2!, y2!

The lower right corner of the bounding rectangle.

rgbColor&

Optional RGB color of the ellipse edge.  If omitted (or -1), the edge color defaults to the current foreground color for the host printer page.

fillcolor&

Optional RGB color of the ellipse interior.  If fillcolor& is omitted (or -2), the interior of the ellipse is not filled, allowing the background to show through.  If fillcolor& is -1, the interior is painted with the same color as the edge. Otherwise, fillcolor& specifies the RGB color to be used.

fillstyle&

Optional fill style (pattern) to be used.  If fillstyle& is omitted, the default fill style is solid (0).  If a hatch pattern is chosen (1 to 6), the foreground color is specified by the fillcolor&, while the background is specified by the default background color for the host printer page.  The optional fillstyle& may be:

0

Solid (default)

1

Horizontal Lines

2

Vertical Lines

3

Upward Diagonal Lines

4

Downward Diagonal Lines

5

Crossed Lines

6

Diagonal Crossed Lines

See also

XPRINT ARC, XPRINT ATTACH, XPRINT COLOR, XPRINT LINE, XPRINT PIE, XPRINT STYLE, XPRINT WIDTH

Example

' Draw a circle, using default colors.

XPRINT ELLIPSE (10, 10) - (100, 100)

 

' Draw a blue ellipse filled with a light-gray,

' diagonal cross pattern.

XPRINT ELLIPSE (15, 25) - (95, 50), %BLUE, RGB(191,191,191), 6