beautypg.com

Setlinewidth – AMT Datasouth PAL User Manual

Page 178

background image

setlinewidth

172

setlinewidth

Description

Controls the width, or thickness, of lines drawn using the stroke operator.

Usage

WidthNum

setlinewidth

WidthNum

Integer or fixed-point. Specifies the desired line width, or thickness, in user co-
ordinate system units.

Comments

The graphics state contains various parameters which influence the manner in which the stroke
operator renders a path onto the page. setlinewidth allows the programmer to change the line
width, or thickness, specified in the graphics state.

During a stroke operation, PAL uses the line information contained in the current path to establish
the center of lines on the page. Therefore, as shown below, the line will extend for ½ WidthNum
to both sides of the center line.

Center Line

WidthNum

PAL uses a default line width of one user coordinate system unit.

Hints

If the programmer scales the user coordinate system, the programmer will probably also wish to
change the line width before drawing any lines. For example, if the user changes the user coordi-
nate system to inches, the programmer probably will not want to draw one inch wide lines.

No matter how small a line width the programmer specifies, PAL guarantees to draw lines at least
one pixel thick. Specifying a line width of zero instructs PAL to draw hairlines. PAL draws
hairlines as a single pixel thick regardless of the resolution of the device. This may not work well
on extremely high resolution devices such as photo-typesetters. However, it will work fine on
common computer printers.