stroke
A drawing operator that strokes the current path according to the current line width, line join, line cap, and dash settings. After stroke the current path will be cleared from the Canvas. Note: 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 via changeDash. If the cap style is LineCap.ROUND, or LineCap.SQUARE then these segments will be drawn as circular dots or squares respectively. In the case of LineCap.SQUARE the orientation of the squares is determined by the direction of the underlying path.
A sub-path created by Path.moveTo followed by either a cairo_close_path, or one or more calls to Path.lineTo to the same coordinate as Path.moveTo. If the cap style is LineCap.ROUND then these sub-paths will be drawn as circular dots. Note that in the case of LineCap.SQUARE a degenerate sub-path will not be drawn at all (since the correct orientation is indeterminate).
In no case will a cap style of LineCap.BUTT cause anything to be drawn in the case of either degenerate segments or sub-paths.