Manual

171
setlinecap
setlinecap
Description
Controls the drawing of line end caps during a stroke operation.
Usage
CapStyleInt setlinecap
CapStyleInt Integer. Selects the desired line cap style. A value of 0 selects butt end caps. A
value of 2 selects square end caps.
Comments
The graphics state contains various parameters which influence the manner in which the stroke
operator renders a path onto the page.
setlinecap
allows the programmer to change the line end
cap style specified in the graphics state.
The stroke operator uses the current line end cap style when drawing the starting and ending
points of open paths. For a closed path, PAL joins together the starting and ending points, so no
end points exist.
PAL currently provides two styles of line end caps — butt and square. The illustrations provided
below show the difference between the two styles. The gray area shows the actual line drawn by
the stroke operator based on the current line width. The solid line shows the center line as
specified using the
lineto
operator.
Butt End Caps
Square End Caps
The current line cap style has no affect until PAL encounters the stroke operator. Therefore, the
programmer may specify
setlinecap
either before or after using the various drawing operators to
build the desired path.
PAL uses the butt end cap style by default.