Cairo.Stroke (gb.cairo)

Static Sub Stroke ( [ Preserve As Boolean ] )

A drawing operator that strokes the current path according to the current line width, line join, line cap, and dash settings.

After Cairo.Stroke, the current path will be cleared from the cairo context, unless the Preserve argument is set to TRUE.

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 Dash property. If the cap style is LineCapRound or LineCapSquare then these segments will be drawn as circular dots or squares respectively. In the case of LineCapSquare, the orientation of the squares is determined by the direction of the underlying path.

  2. A sub-path created by Cairo.MoveTo followed by either a Cairo.ClosePath or one or more calls to Cairo.LineTo to the same coordinate as the Cairo.MoveTo. If the cap style is LineCapRound then these sub-paths will be drawn as circular dots. Note that in the case of LineCapSquare a degenerate sub-path will not be drawn at all, (since the correct orientation is indeterminate).

In no case will a cap style of LineCapButt cause anything to be drawn in the case of either degenerate segments or sub-paths.

See also