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

21-36 The Polygon Group EN
commands (PA0,1750;PM0), the absolute coordinates (0,1750)
specify the first point of your polygon. Each subsequent pair of
coordinates defines a point, or vertex, of the polygon.
You can define points with the pen up or down. However, the EP
command only draws between points that are defined when the
pen is down. On the other hand, the FP command fills the area(s)
between all vertices, regardless of whether the pen is up or down
when defined.
It is good programming practice to ‘close’ the polygon before exiting
polygon mode. Closing a polygon means adding the final vertex that
defines a continuous shape; the last coordinates or increments
represent the same location as the
first. If you have not closed the polygon, executing (PM1) or (PM2)
forces closure by adding a point to close the polygon.
You can also use the Initialize (IN) or Default Values (DF) commands
while in polygon mode. Both commands exit polygon mode, clear
the polygon buffer, and begin executing subsequent commands
immediately. You must exit polygon mode to execute other HP-GL/2
graphics commands.
Note Sending an ?E while in polygon mode causes the printer to exit
polygon mode, clear the polygon buffer, exit HP-GL/2 mode, and
eject a page. Sending an
?E while in polygon mode is not recom-
mended, but it performs an important function (allowing you to
recover from a previous job that left the printer in polygon mode).
(PM1)
Use (PM1) to close the current polygon (or subpolygon) and remain
in polygon mode; the printer adds a closure point if necessary. When
you use (PM1), the point after (PM1) becomes the first point of the
next subpolygon. This move is not used as a boundary when filling a
polygon with FP. When drawing the polygon, the pen always moves
to this point in the up position, regardless of the current pen status.
Each subsequent coordinate pair after (PM1) defines a point of the
subpolygon.