Instance Method

stroke()

Draws a line along the receiver’s path using the current drawing properties.

Declaration

func stroke()

Discussion

The drawn line is centered on the path with its sides parallel to the path segment. This method applies the current drawing properties to the rendered path.

This method automatically saves the current graphics state prior to drawing and restores that state when it is done, so you do not have to save the graphics state yourself.

See Also

Drawing Paths

func fill()

Paints the region enclosed by the receiver’s path using the current drawing properties.

func fill(with: CGBlendMode, alpha: CGFloat)

Paints the region enclosed by the receiver’s path using the specified blend mode and transparency values.

func stroke(with: CGBlendMode, alpha: CGFloat)

Draws a line along the receiver’s path using the specified blend mode and transparency values.