Instance Method

applyStrokePropertiesToContext:atZoomScale:

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

Declaration

- (void)applyStrokePropertiesToContext:(CGContextRef)context atZoomScale:(MKZoomScale)zoomScale;

Parameters

context

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

zoomScale

The current zoom scale used for drawing.

Discussion

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

- applyFillPropertiesToContext:atZoomScale:

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

- strokePath:inContext:

Draws a line along the specified path.

- fillPath:inContext:

Fills the area enclosed by the specified path.