Function

CGContextSetStrokeColor

Sets the current stroke color.

Declaration

void CGContextSetStrokeColor(CGContextRef c, const CGFloat *components);

Parameters

c

The graphics context for which to set the current stroke color.

components

An array of intensity values describing the color to set. The number of array elements must equal the number of components in the current stroke color space, plus an additional component for the alpha value.

Discussion

The current stroke color space must not be a pattern color space. For information on setting the stroke color when using a pattern color space, see CGContextSetStrokePattern. Note that the preferred API is now CGContextSetStrokeColorWithColor.

See Also

Setting Color, Color Space, and Shadow Values

CGContextSetAlpha

Sets the opacity level for objects drawn in a graphics context.

CGContextSetCMYKFillColor

Sets the current fill color to a value in the DeviceCMYK color space.

CGContextSetFillColor

Sets the current fill color.

CGContextSetCMYKStrokeColor

Sets the current stroke color to a value in the DeviceCMYK color space.

CGContextSetFillColorSpace

Sets the fill color space in a graphics context.

CGContextSetFillColorWithColor

Sets the current fill color in a graphics context, using a CGColor.

CGContextSetGrayFillColor

Sets the current fill color to a value in the DeviceGray color space.

CGContextSetGrayStrokeColor

Sets the current stroke color to a value in the DeviceGray color space.

CGContextSetRGBFillColor

Sets the current fill color to a value in the DeviceRGB color space.

CGContextSetRGBStrokeColor

Sets the current stroke color to a value in the DeviceRGB color space.

CGContextSetShadow

Enables shadowing in a graphics context.

CGContextSetShadowWithColor

Enables shadowing with color a graphics context.

CGContextSetStrokeColorSpace

Sets the stroke color space in a graphics context.

CGContextSetStrokeColorWithColor

Sets the current stroke color in a context, using a CGColor.