User Guide
Ruby Component
setLineJoin type
The method takes a single input. This can be either an index or a string:
0 or “mitre” A standard mitre joint – this is the default option
1 or “bevel” The joint is flattened off instead of creating a point at the outer edge
2 or “round” A curved edge is used to join the lines
3 or “mitreclipped” A mitre joint is used if under the mitre limit otherwise a bevel is used
The best way to understand these is to see them in action:
The bottom line shows the “mitreclipped” option. Notice that the first joint is beveled but the others are mitred. This is because for the first
joint a mitre would extend beyond the mitre limit.
The mitre limit is the maximum allowed limit of mitre length to pen width. The mitre length is measured as shown in the diagram below.
The default mitre limit for a pen is 10.0 but you can change this using the setMitreLimit method.
setMitreLimit limit
If the line join is set to the default “mitre” option then any mitre joins above the mitre limit will be clipped at the mitre limit. However, if the line
join is set to “mitreclipped” then any mitre joins above the mitre limit will be converted to bevels.
142 of 212
Mitre length