PrintRoundRect
PowerScript function
Description
Draws a white rectangle with rounded corners and a border of the
specified thickness on the print page.
Syntax
|
1 |
PrintRoundRect ( printjobnumber, x, y, width, height, xradius, yradius, thickness ) |
|
Argument |
Description |
|---|---|
|
printjobnumber |
The number the PrintOpen function assigned to the print |
|
x |
An integer specifying the x coordinate in thousandths of |
|
y |
An integer specifying the y coordinate in thousandths of |
|
width |
An integer specifying the rectangle’s width in thousandths |
|
height |
An integer specifying the rectangle’s height in |
|
xradius |
An integer specifying the x radius of the corner |
|
yradius |
An integer specifying the y radius of the corner |
|
thickness |
An integer specifying the thickness of the rectangle’s |
Return value
Integer. Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, PrintRoundRect 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.
PrintRoundRect 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 new print job, which begins a new page, and
prints a rectangle with rounded corners as a page border. Then it closes
the print job, which sends the page to the printer.
The rectangle is 6 1/4 inches wide by 9 inches high and its upper
corner is one inch from the top and one inch from the left edge of the
print area. The border has a line thickness of 1/8 of an inch and the
corner radius is 300:
|
1 2 3 4 5 6 7 8 9 10 11 |
long Job // Define a new blank page. Job = PrintOpen() // Print a RoundRectangle on the page. PrintRoundRect(Job, 1000,1000, 6250,9000, & 300,300, 125) // Send the page to the printer. PrintClose(Job) |
See also