Package: cairo

Function cairo-stroke

Lambda List

cairo-stroke (cr)

Arguments

cr -- a cairo-t context

Details

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-set-line-width, cairo-set-line-join, cairo-set-line-cap, cairo-set-dash, and cairo-stroke-preserve functions.

Note

Degenerate segments and sub-paths are treated specially and provide a useful result. These can result in two different situations:
  1. Zero-length "on" segments set in the cairo-set-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.
  2. 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.
 

See also

2021-12-12