SECTION 4.3
217
Graphics State
Note:
The definition of round join was changed in PDF 1.5. In rare cases, the imple-
mentation of the previous specification could produce unexpected results.
Miter Limit
When two line segments meet at a sharp angle and mitered joins have been spec-
ified as the line join style, it is possible for the miter to extend far beyond the
thickness of the line stroking the path. The
miter limit
imposes a maximum on
the ratio of the miter length to the line width (see Figure 4.7). When the limit is
exceeded, the join is converted from a miter to a bevel.
The ratio of miter length to line width is directly related to the angle
ϕ
between
the segments in user space by the following formula:
miterLength
1
-
---------------------------- = -----------------
-
ϕ
lineWidth
-
sin
⎛
--
⎞
⎝
2
⎠
For example, a miter limit of 1.414 converts miters to bevels for
ϕ
less than 90
degrees, a limit of 2.0 converts them for
ϕ
less than 60 degrees, and a limit of 10.0
converts them for
ϕ
less than approximately 11.5 degrees.
Miter
length
j
Line width
FIGURE 4.7
Miter length
Line Dash Pattern
The
line dash pattern
controls the pattern of dashes and gaps used to stroke paths.
It is specified by a
dash array
and a
dash phase.
The dash array’s elements are
numbers that specify the lengths of alternating dashes and gaps; the numbers
must be nonnegative and not all zero. The dash phase specifies the distance into