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

EN RR, Fill Rectangle Relative 21-43
Figure 21-24Fill Rectangle Relative
The only difference between the RR command and the ER (Edge
Relative Rectangle) command is that the RR command produces
a filled rectangle, and ER, an outlined one.
The RR command clears the polygon buffer and then uses it to define
the rectangle before drawing. A rectangle requires enough buffer
space to hold five points.
The following example uses RR with three different fill types (refer to
the FT command description) to create rectangles such as those you
might use in a bar chart. The rectangles in the right bar are edged
using the ER command.
Table 21-24 Example: Using the RR 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;
RR400,800;
Specify absolute plotting and move to location
(400,400). Fill a rectangle with the default fill
(black), with (400,400) as the lower left corner
and the upper right corner 400 plu to the right
and 800 plu up from there.