Instance Method

strokePath(_:in:)

Draws a line along the specified path.

Declaration

func strokePath(_ path: CGPath, in context: CGContext)

Parameters

path

The path to draw.

context

The graphics context in which to draw the path.

Discussion

You must set the current stroke color before calling this method. Typically you do this by calling the applyStrokeProperties(to:atZoomScale:) method prior to drawing. If the strokeColor property is currently nil, this method does nothing.

See Also

Drawing the Path

func applyStrokeProperties(to: CGContext, atZoomScale: MKZoomScale)

Applies the receiver’s current stroke-related drawing properties to the specified graphics context.

func applyFillProperties(to: CGContext, atZoomScale: MKZoomScale)

Applies the receiver’s current fill-related drawing properties to the specified graphics context.

func fillPath(CGPath, in: CGContext)

Fills the area enclosed by the specified path.

var shouldRasterize: Bool

A Boolean that determines if the overlay is rendered as a bitmap before compositing.