beautypg.com

Scale – AMT Datasouth PAL User Manual

Page 170

background image

scale

164

scale

Description

Independently alter the scale factors for the user coordinate system along the X and Y axis.

Usage

XScaleNum YScaleNum

scale

XScaleNum

Integer or fixed-point. Factor by which to adjust scaling along the X axis.

YScaleNum

Integer or fixed-point. Factor by which to adjust scaling along the Y axis.

Comments

PAL applies the new scale factors to the current user coordinate system. Therefore, scale factors
accumulate. The orders "2 4 scale 4 8 scale" produce the same affect as "8 32 scale".

Hints

The scale operator allows the programmer to customize the coordinate system. For example,
United States programmers might prefer to use inches as their standard unit of measure. A U.S.
programmer can quickly adjust the user coordinate scale factor from points (1/72") to inches using
the order "72 72 scale".

On the other hand, programmers in other parts of the world might prefer to use millimeters as their
standard unit of measure. These programmers can quickly adjust the user coordinate scale factor
from points to millimeters using the order "72 25.4 div 72 25.4 div scale".

The programmer should take note that changing the coordinate system scale factor also affects
fonts. Initially, a font dictionary indicates that PAL should draw the font with a height of one user
unit. Under the default coordinate system, this means one point (1/72").

If the user changes the coordinate system to, for example, one inch, the font dictionary will then
specify a one inch tall font. Under the default coordinate system, the programmer would use the
operation "12 scalefont" to make the font 12 points tall. However, if the programmer did this with
an one inch coordinate system, it would specify a 12 inch tall font. Instead, the programmer would
need to use "12 72 div scalefont" to select a 12 point font.