A drawing operator that strokes the current path according to the current
line width, line join, line cap, and dash settings. After the
cairo:stroke function, the current path will be cleared from the Cairo context. See the
cairo:line-width,
cairo:line-join,
cairo:line-cap,
cairo:dash, and
cairo:stroke-preserve
functions.
Notes
Degenerate segments and sub-paths are treated specially and provide
a useful result. These can result in two different situations:
- Zero-length "on" segments set in the cairo:dash function. If the cairo:line-cap-t style is :round or :square then these segments will be drawn as circular dots or squares respectively. In the case of :square, the orientation of
the squares is determined by the direction of the underlying path.
- A sub-path created by the cairo:move-to function followed by either a call to the cairo:close-path function or one or more calls to the cairo:line-to function to the same coordinate as the the cairo:move-to function. If the cairo:line-cap-t style is :round then these sub-paths will be drawn as circular dots. Note that in the case of :square a degenerate sub-path will not
be drawn at all, since the correct orientation is indeterminate.
In no case will a
cairo:line-cap-t style of
:butt cause
anything to be drawn in the case of either degenerate segments or sub-paths.