AMT Datasouth 4000 User Manual

Page 48

Advertising
background image

User's Guide 48

Printing a Box

Label Output

PAL

TM

Command Sequences

/Sans12.00pt findfont

12 scalefont

setfont

72 72 moveto

(Hello World!) show

72 68 moveto

144 68 lineto

30 30 moveto

258 30 lineto

258 258 lineto

30 258 lineto

closepath

2 setlinewidth

Hello World!

1 "

1 "

stroke

1 _showpages

Purpose: Demonstrate the drawing of a rectangular box. This example builds on the previous
example by drawing a frame around the label. A 4” x 4” (288 points x 288 points) label is used in
this example. The frame will be placed within 30 points of the edge of the label.

moveto - Position the drawing cursor at the desired location

This example assumes a 4” x 4” label (288 points x 288 points). A frame is drawn by moving to
the starting point with the moveto operator.

lineto - Set the dimensions for the line

Forms three sides of the box with three separate lineto operators.

closepath - Close the shape

A box is drawn by drawing 3 sides of the box with the lineto operator followed by closepath,
which closes the box by drawing the last line. It is important to use this operator to close a shape
since the imaging algorithms may or may not actually close the shape due to rounding errors in
the algorithm.

setlinewidth - Set the width of the lines

The width is set in points. In this example, the line width is set to 2 points. The this line width
value will remain the effective value for all lines until changed.

Advertising
This manual is related to the following products: