Contents

setStrokeColor(cyan:magenta:yellow:black:alpha:)

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

Declaration

func setStrokeColor(cyan: CGFloat, magenta: CGFloat, yellow: CGFloat, black: CGFloat, alpha: CGFloat)

Parameters

  • cyan:

    The cyan intensity value for the color to set. The DeviceCMYK color space permits the specification of a value ranging from 0.0 (does not absorb the secondary color) to 1.0 (fully absorbs the secondary color).

  • magenta:

    The magenta intensity value for the color to set. The DeviceCMYK color space permits the specification of a value ranging from 0.0 (does not absorb the secondary color) to 1.0 (fully absorbs the secondary color).

  • yellow:

    The yellow intensity value for the color to set. The DeviceCMYK color space permits the specification of a value ranging from 0.0 (does not absorb the secondary color) to 1.0 (fully absorbs the secondary color).

  • black:

    The black intensity value for the color to set. The DeviceCMYK color space permits the specification of a value ranging from 0.0 (does not absorb the secondary color) to 1.0 (fully absorbs the secondary color).

  • alpha:

    A value that specifies the opacity level. Values can range from 0.0 (transparent) to 1.0 (opaque). Values outside this range are clipped to 0.0 or 1.0.

Discussion

When you call this function, two things happen:

  • Core Graphics sets the current stroke color space to DeviceCMYK.

  • Core Graphics sets the current stroke color to the value specified by the cyan, magenta, yellow, black, and alpha parameters.

See Also

Setting Fill, Stroke, and Shadow Colors