CHAPTER 4 HP-GL/2 - 15
SC - Scale
<HP-GL/2>
SC [ X
min
,
X
max
, Y
min
, Y
max
[, type ]] [;] (Type = 0)
SC [ X
min
,
X
max
, Y
min
, Y
max
,
type
[ left, bottom]] [;] (
Type
=1)
SC [ X
min
, X
factor
, Y
min
Y
factor
[,
type
]] [;] (
Type
= 2)
X
min
; X coordinate of P1
X
max
; X coordinate of P2
Y
min
; Y coordinate of P1
Y
max
; Y coordinate of P2
Type
; type of scaling
Left
; percentage of unused space to be left to the left of the scaling area
bottom
; percentage of unused space to be left below the scaling area
X
factor
; number of graphics units per user unit on the x-axis.
Y
factor
; number of graphics units per user unit on the y-axis.
ï‚Ÿ
This command turns scaling on and establishes a user unit coordinate system. The coordinate system is
specified relative to the points P1 and P2. The origin need not necessarily be at P1. Three different types
of scaling are available.
ï‚Ÿ
The technical terms, user unit and graphics unit, as used in this manual are defined as follows:
User unit
: the unit of the coordinates set by the SC instruction.
Graphics unit : the unit(1/1016 of an inch) of the coordinates not set by the SC instruction.
ï‚Ÿ
All coordinates are in user units.
ï‚Ÿ
Coordinate values for X
min
,
X
max
, Y
min
, and Y
max
are given as real numbers.
ï‚Ÿ
X
min
, Y
min
, X
max
and Y
max
specify the range of the X- and Y-axes. X
min
and Y
min
value should be P1 and
X
max
and Y
max
should be P2.
ï‚Ÿ
X
min
must be different from X
max
, and Y
min
must be different from Y
max
.
ï‚Ÿ
Using this instruction without a parameter field turns the scaling off.
ï‚Ÿ
Type
can be 0, 1 or 2, which select scaling types known as anisotropic, isotropic and point factor scaling
respectively.
ï‚Ÿ
Type
0 scaling (anisotropic scaling, the default) allows you to specify different sized x-axis and y-axis units.
Hence the area specified by X
min
,
X
max
, Y
min
, and Y
max
will occupy the entire area defined by P1 and P2.
P1 (0,0)
P2 (7,6)
ï‚Ÿ
left and bottom settings have no effect in
type
0 scaling.
ï‚Ÿ
Type
1 scaling (isotropic scaling) forces x-axis and y-axis units to be the same size. As a result the area
specified by X
min
,
X
max
, Y
min
, and Y
max
(the isotropic area) may not fit exactly into the rectangular area
defined by P1 and P2.
P1
(0,0)
(6,7)
P2