setStrokeJoin allows to set three modes how a line join of thick lines is rendered.
ROUND means a circular section is used to go around the kink,
BEVEL means another short straigt segment is used perpendicular to the halve angle, and
MITER means the outer contour of the two joining lines is elongated until it intersects. However, when the angle is really sharp, that point can go very far away, so usually a limit is set that switches from
BEVEL, if certain sharpness is reached. This limit is controlled by
setStrokeMiter. For examples see here.