PrintRect
PowerScript function
Description
Draws a white rectangle with a border of the specified thickness on
the print page.
Syntax
|
1 |
PrintRect ( printjobnumber, x, y, width, height, 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 |
|
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, PrintRect 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.
PrintRect 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
These statements open a print job with a new page and draw a 1-inch
square with a line thickness of 1/8 of an inch. The square’s upper left
corner is four inches from the left and three inches from the top of the
print area:
|
1 2 3 4 5 6 7 |
long Job // Define a new blank page. Job = PrintOpen() // Print the rectangle on the page. PrintRect(Job, 4000,3000, 1000,1000, 125) ... // Other printing PrintClose(Job) |
See also