Instance Method


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


func applyStrokeProperties(to context: CGContext, atZoomScale zoomScale: MKZoomScale)



The graphics context used to draw the view’s contents.


The current zoom scale used for drawing.


This is a convenience method for applying all of the drawing properties used when stroking a path. This method applies the stroke color, line width, line join, line cap, miter limit, line dash phase, and line dash attributes to the specified graphics context. This method applies the scale factor in the zoomScale parameter to the line width and line dash pattern automatically so that lines scale appropriately.

This method does not save the current graphics state before applying the new attributes. If you want to preserve the existing state, you must save it yourself and restore it later when you finish drawing.

See Also

Drawing the Path

func applyFillProperties(to: CGContext, atZoomScale: MKZoomScale)

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

func strokePath(CGPath, in: CGContext)

Draws a line along the specified path.

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.