CGContext.SetStrokeColor Method

Definition

Overloads

SetStrokeColor(CGColor)

Sets the stroke color.

SetStrokeColor(nfloat[])

Sets the stroke color. This API has undefined behavior if you do not set the colorspace beforehand.

SetStrokeColor(nfloat, nfloat)

Sets the stroke color to a grayscale value.

SetStrokeColor(nfloat, nfloat, nfloat, nfloat)

Sets the stroke color to an RGBA color.

SetStrokeColor(nfloat, nfloat, nfloat, nfloat, nfloat)

Sets the stroke color to a CMYKA color.

SetStrokeColor(CGColor)

Sets the stroke color.

public void SetStrokeColor (CoreGraphics.CGColor color);
member this.SetStrokeColor : CoreGraphics.CGColor -> unit

Parameters

color
CGColor

The desired CGColor.

SetStrokeColor(nfloat[])

Sets the stroke color. This API has undefined behavior if you do not set the colorspace beforehand.

public void SetStrokeColor (nfloat[] components);
member this.SetStrokeColor : nfloat[] -> unit

Parameters

components
nfloat[]

An array of components, specific to the currently selected colorspace

Remarks

Sets the stroke color to the values specified in the components array. The number of elements in this array must be equal to the number of components in the current colorspace plus an additional element for the alpha value. For this API to work, you must previously set the colorspace on the context using SetStrokeColorSpace(), otherwise the results of calling this method are unspecified.

SetStrokeColor(nfloat, nfloat)

Sets the stroke color to a grayscale value.

public void SetStrokeColor (nfloat gray, nfloat alpha);
member this.SetStrokeColor : nfloat * nfloat -> unit

Parameters

gray
nfloat

The grayscale value, in the range 0.0 (black) to 1.0 (white).

alpha
nfloat

The opacity, in the range 0.0 to 1.0.

SetStrokeColor(nfloat, nfloat, nfloat, nfloat)

Sets the stroke color to an RGBA color.

public void SetStrokeColor (nfloat red, nfloat green, nfloat blue, nfloat alpha);
member this.SetStrokeColor : nfloat * nfloat * nfloat * nfloat -> unit

Parameters

red
nfloat

The red component, in the range 0.0 to 1.0.

green
nfloat

The green component, in the range 0.0 to 1.0.

blue
nfloat

The blue component, in the range 0.0 to 1.0.

alpha
nfloat

The opacity, in the range 0.0 to 1.0.

SetStrokeColor(nfloat, nfloat, nfloat, nfloat, nfloat)

Sets the stroke color to a CMYKA color.

public void SetStrokeColor (nfloat cyan, nfloat magenta, nfloat yellow, nfloat black, nfloat alpha);
member this.SetStrokeColor : nfloat * nfloat * nfloat * nfloat * nfloat -> unit

Parameters

cyan
nfloat

The cyan component, in the range 0.0 to 1.0.

magenta
nfloat

The magenta component, in the range 0.0 to 1.0.

yellow
nfloat

The yellow component, in the range 0.0 to 1.0.

black
nfloat

The black component, in the range 0.0 to 1.0.

alpha
nfloat

The opacity, in the range 0.0 to 1.0.

Applies to