Function

CGContextSetStrokeColorSpace

Sets the stroke color space in a graphics context.

Declaration

void CGContextSetStrokeColorSpace(CGContextRef c, CGColorSpaceRef space);

Parameters

c

The graphics context for the new stroke color space.

colorspace

The new stroke color space. The color space is retained; upon return, you may safely release it.

Discussion

As a side effect when you call this function, Core Graphics assigns an appropriate initial value to the stroke color, based on the color space you specify. To change this value, call CGContextSetStrokeColor. 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.

CGContextSetStrokeColor

Sets the current stroke color.

CGContextSetStrokeColorWithColor

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software