The Hp-Gl Graphics Window - Brother HL-Series Technical Reference Manual

Hide thumbs Also See for HL-Series:
Table of Contents

Advertisement

Revision C 16/01/96

4. The HP-GL graphics window

Units
When you first enter graphics mode, the prevailing coordinate system has its origin in the bottom left hand
corner of the graphics window and has x- and y-units of 1/1016". Using the SC command you can divide the
axes into more convenient units. The size of the graphics window remains unaltered.
The scaling points P1 and P2
Many instructions use two reference scaling points, P1 and P2. Initially these are in the bottom left and top
right hand corners of the graphics window respectively. You can alter the position of these points relative to
the graphics window, or relative to one another, using the IP or IR commands.
Scaling
You can easily scale images up or down by increasing or decreasing the distance between P1 and P2. You
can do this both with existing images that are to be imported and with images that are generated by a string
of HP-GL and HP-GL/2 commands - identical commands can be used to create the same image in different
sizes.
Transformation
You can transform images horizontally or vertically by changing the relative positions of P1 and P2. You
can do this both with existing images that are to be imported and with images that are generated by a string
of HP-GL/2 commands.
5. Preparing to print graphic images
Setting up the graphics window
Before entering HP-GL/2 mode you will probably want to set the dimensions and position of the PCL picture
frame and hence the graphics window. (Remember that when you enter HP-GL/2 mode they are initially the
same). To do this you will need to send some preparatory PCL commands while in LaserJet mode. Use the
Esc*c0T command to position the picture frame and the Esc*c#X and Esc*c#Y commands to determine it's
horizontal and vertical dimensions respectively. These commands are described fully in the sub-section
Vector Graphics in the LaserJet section of this manual. ( Section 2 )
If you do not specify a position and dimensions for the picture frame, the default picture frame is used. This
is described in the sub-section The Page in the LaserJet section of this manual.
Using Existing image plots.
If you are importing an existing HP-GL/2 plot you can easily determine the size and position on the page of
the resulting printed graphic. Images are automatically scaled and fitted to the picture frame ( the HP-GL/2
graphics window ) in either of the following two cases.
1)
If you use the Esc*c#K and Esc*c#L PCL commands to specify the width and height of the original
plot before entering HP-GL/2 mode. These commands are explained in the sub-section Vector
Graphics in the LaserJet section of this manual. Only use these commands if you are importing an
existing plot.
2)
If the imported image code is page-size independent.
An image is page-size independent if it's HP-GL/2 code satisfies the following conditions.
Ÿ
User units are used exclusively, that is, an SC command is used before any drawing commands are
issued. Note in particular that if the graphics window is changed from the default using the IW
command, it must be specified in user units.
Ÿ
No absolute units are used or implied, that is, drawing commands use relative movement only and
character size, pattern length and pen width are always specified as relative measurements.
Commands like IP and PA, which imply the use of absolute units even if none are explicitly supplied,
should not be used at all.
Chapter 8 "HP-GL2" 6

Advertisement

Table of Contents
loading

Table of Contents