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

EN Using Scaling Effectively 19-13
The following example uses a subroutine to draw the same picture
(an arrow) four times. Because the program changes the relative
locations of P1 and P2, the direction of the arrow is different in each
of the four drawings. The
program sets P1 and P2, draws the plot, then returns to reset P1
and P2 (using the IP command). This continues until all four possible
mirror-images are plotted. (The original drawing is shown in each
picture so you can compare the orientation of the mirror-image.)
Table 19-4 Example: Creating a Mirror-Image
E
C
E Reset the printer.
E
C
%0B Enter HP-GL/2 mode.
IN; Initialize HP-GL/2 mode.
SP1; Select pen number 1. You must use
the SP command to enable printing.
IP1500,3600,3000,5100; Specify the P1/P2 locations for the first
arrow figure.
SC-15,15,-10,10; Set up user scaling: (-15,-10) to
(15,10).
(Run subroutine) Run the subroutine (below) that prints
the arrow image.
IP3000,3600,1500,5100; Change the physical locations of P1
and P2 to flip the image to the left.
(Run subroutine) Print the second image.
IP1500,5100,3000,3600; Change the physical locations of P1
and P2 to flip the image down.
(Run subroutine) Print the third image.
IP3000,5100,1500,3600; Change P1/P2 locations to flip the
image to the left and down.
(Run subroutine) Print the fourth image.
E
C
%0A Enter the PCL mode.
E
C
E Send a reset to end the job and eject
the page.