Drawing Rectangles

You can draw a rectangle by outlining (edging) the defined area using the Edge Rectangle Absolute (EA) or Edge Rectangle Relative (ER) commands.

To draw a rectangle, the printer uses the current pen location for one corner; you give the coordinates for the diagonally opposite corner. The printer draws the rectangle defined by these two points. The following simple command sequence uses EA to draw a rectangle.

Table 21-3

Example: Drawing Rectangles

?E

Reset the printer.

 

 

?%0B

Enter HP-GL/2 mode.

 

 

IN;

Initialize HP-GL/2 mode.

 

 

SP1;

Select pen number 1 (black). You must select a

 

pen to print HP-GL/2 images.

 

 

PA10,10;

Specify absolute plotting and move to (10,10).

 

 

EA2500,1500;

Draw the outline of a rectangle, with the lower

 

left corner being the current pen location

 

(10,10) and the upper right corner being

 

(2500,1500).

 

 

?%0A

Enter the PCL mode.

 

 

?E

Send a reset to end the job and eject the page.

 

 

EN

Drawing Rectangles 21-3

Page 515
Image 515
HP 5961-0509 manual Example Drawing Rectangles, ?%0B Enter HP-GL/2 mode Initialize HP-GL/2 mode SP1