PrintOval

Description

Draws a white oval outlined in a line of the specified thickness on the print page.

Syntax

PrintOval ( printjobnumber, x, y, width, height, thickness )

Argument

Description

printjobnumber

The number the PrintOpen function assigned to the print job

x

An integer specifying the x coordinate in thousandths of an inch of the upper-left corner of the oval's bounding box

y

An integer specifying the y coordinate in thousandths of an inch of the upper-left corner of the oval's bounding box

width

An integer specifying the width in thousandths of an inch of the oval's bounding box

height

An integer specifying the height in thousandths of an inch of the oval's bounding box

thickness

An integer specifying the thickness of the line that outlines the oval in thousandths of an inch


Return value

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, PrintOval returns null.

Usage

The PrintOval, PrintRect, and PrintRoundRect functions draw filled shapes. To print other shapes or text inside the shapes, draw the filled shape first and then add text and other shapes or lines inside it. If you draw the filled shape after other printing functions, it will cover anything inside it. For example, to draw a border around text and lines, draw the oval or rectangular border first and then use PrintLine and PrintText to position the lines and text inside.

PrintOval does not change the position of the print cursor, which remains where it was before the function was called. In general, print functions in which you specify coordinates do not affect the print cursor.

Examples

This example starts a print job with a new blank page, and then prints an oval that fits in a 1-inch square. The upper-left corner of the oval's bounding box is four inches from the top and three inches from the left edge of the print area. Because its height and width are equal, the oval is actually a circle:

long Job
// Define a new blank page.
Job = PrintOpen()
// Print an oval.
PrintOval(Job, 4000, 3000, 1000, 1000, 10)
... // Other printing
PrintClose(Job)

See also

PrintBitmap

PrintClose

PrintLine

PrintOpen

PrintRect

PrintRoundRect