HP PCL/PJL reference (PCL 5 Printer Language) - Technical Reference Manual Part II

21-40 The Polygon Group EN
The only difference between the RA command and the EA (Edge
Rectangle Absolute) command is that the RA command produces
a filled rectangle, and EA, an outlined one.
The RA command clears the polygon buffer and then uses it to define
the rectangle before drawing. Refer to “Using the Polygon Buffer”
earlier in this chapter.
The following example uses RA with three different fill types to create
rectangles such as those you might use in a bar chart. The rectangles
in the right bar are edged using the EA command. (For more
information about fill types, refer to the FT command description in
Chapter 22.)
Table 21-22 Example: Using the RA Command with Different
Fill Types
?E Reset the printer.
?%0B Enter HP-GL/2 mode.
IN; Initialize HP-GL/2 mode.
SP1; Select pen number 1. Even though there is no
physical pen, the SP command must be used
to enable printing.
PA400,400;
RA800,1200;
Enter absolute plotting mode and move to
(400,400). Draw a rectangle with (400,400) as
the lower left corner and (800,1200) as the
upper right corner.
PA400,1200;FT3,
50;RA800,1600;
Move the pen to (400,1200), select fill type 3
(parallel lines) with a 50 plu space between
lines, and draw a rectangle with (400,1200)
as the lower left corner and (800,1600) as
the upper right corner.
PA400,1600;FT4;
RA800,2000;
Move to (400,1600) and specify fill type 4
(cross-hatching). Draw a rectangle with a
lower left corner of (400,1600) and an upper
right corner of (800,2000).
PA1200,400;FT;
RA1600,1200;
EA1600,1200;
Move to location (1200,400) and select the
default fill type (solid black). Fill and edge a
rectangle using (1200,400) as the lower left
corner and (1600,1200) as the upper right
corner.