10/10/03

SC - Scale

<HP-GL/2>

SC [ Xmin, Xmax, Ymin, Ymax [, type ]] [;] (Type = 0)

SC [ Xmin, Xmax, Ymin, Ymax , type [ left, bottom]] [;] (Type =1) SC [ Xmin, X factor, Y min Y factor [, type ]] [;] (Type = 2)

Xmin ; X coordinate of P1

Xmax ; X coordinate of P2

Ymin ; Y coordinate of P1

Ymax ; 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 Xfactor ; number of graphics units per user unit on the x-axis.

Yfactor ; 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 Xmin, Xmax, Ymin, and Ymax are given as real numbers.

Xmin, Ymin, Xmax and Ymax specify the range of the X- and Y-axes. Xmin and Ymin value should be P1 and Xmax and Ymax should be P2.

Xmin must be different from Xmax, and Ymin must be different from Ymax.

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 Xmin, Xmax, Ymin, and Ymax will occupy the entire area defined by P1 and P2.

P2 (7,6

P1 (0,0)

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 Xmin, Xmax, Ymin, and Ymax (the isotropic area) may not fit exactly into the rectangular area defined by P1 and P2.

(6,7)

P2

P1 (0,0)

CHAPTER 4 HP-GL/2 - 15

Page 155
Image 155
Homelite HL-1660E, HL-P2500, HL-2400CE, 2060 SC Scale, Min X coordinate of P1, Min Y coordinate of P1, Type type of scaling