9.3 Caps

Open paths need to know how to draw the ends of the stroke. For caps, again, there are three options available, which are somewhat similar to the three join types:

Butt cap

Round cap

Square cap

Stroke cap options in the Fill and Stroke dialog

Figure 9-4. Stroke cap options in the Fill and Stroke dialog

Both round and square caps make the open path longer by its full width, with a half-stroke-width cap added to each end. Only with butt caps (which essentially means no caps), the path is as long as the distance between its end nodes.

The effect of join and cap options is most visible on wide strokes; for strokes that render at 1 px or narrower, they make very little visual difference (except possibly for long miters).

SVG

In SVG, the stroke caps of a path are controlled by the stroke-linecap property, which can take values of butt, round, and square.