Rlineto – AMT Datasouth PAL User Manual
Page 163

157
rlineto
rlineto
Description
Appends a line to the current path which extends from the current point to a point a given distance
away from the current point.
Usage
XDeltaNum YDeltaNum
rlineto
XDeltaNum
Integer or fixed-point. Specifies the X distance over which to extend the line.
YDeltaNum
Integer or fixed-point. Specifies the Y distance over which to extend the line.
Comments
The rlineto operator does not actually draw a line on the current page. Instead, it adds the line to a
drawing path which it keeps in memory. As the programmer specifies additional drawing op-
erations, PAL continues to append these operations to the end of the drawing path. Once the
programmer has specified the entire path for PAL to draw, the programmer uses the stroke
operator to instruct PAL to actually stroke the path onto the page. PAL also provides the
setlinewidth and setlinecap operators which influence the stroke operator.
In general, the programmer should not use rlineto to finish a path around a closed object such as a
square. For a square, the drawing sequence should use rlineto and/or lineto to draw the first three
sides of the square, but closepath for the final side. closepath instructs PAL to join the end of the
closepath line to the first point of the path. This allows PAL to smooth the transition from the last
line to the first line during the stroke operation.
After appending the rlineto operation to the path, PAL updates the current point in the graphics
state to the X and Y coordinate at the specified deltas from the initial coordinate. This allows
subsequent drawing orders to automatically continue from the end of the line.
PAL currently restricts line drawing to horizontal and vertical lines. Therefore, in order to receive
expected results, the programmer should always specify zero for either the XDeltaNum or
YDeltaNum parameter.