CGContext.SetFillColor Method

Definition

Overloads

SetFillColor(CGColor)

Sets the fill color to the specified CGColor.

SetFillColor(nfloat[])

Sets the fill color. SetFillColorSpace(CGColorSpace) must be called prior.

SetFillColor(nfloat, nfloat)

Sets the fill color to a gray level, in the range 0 (black) to 1 (white).

SetFillColor(nfloat, nfloat, nfloat, nfloat)

Sets the fill color to the specified RGBA values.

SetFillColor(nfloat, nfloat, nfloat, nfloat, nfloat)

Sets the fill color using CMYK color-space components, plus an alpha value.

SetFillColor(CGColor)

Sets the fill color to the specified CGColor.

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

Parameters

color
CGColor

The desired CGColor.

Applies to

SetFillColor(nfloat[])

Sets the fill color. SetFillColorSpace(CGColorSpace) must be called prior.

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

Parameters

components
nfloat[]

An array of components, specific to the currently selected colorspace

Remarks

Sets the fill 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. Developers must previously set the colorspace on the context using SetFillColorSpace(CGColorSpace), otherwise the results of calling this method are unspecified.

Applies to

SetFillColor(nfloat, nfloat)

Sets the fill color to a gray level, in the range 0 (black) to 1 (white).

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

Parameters

gray
nfloat

The amount of gray, in the range 0 (black) to 1 (white).

alpha
nfloat

The opacity of the color, in the range 0 (transparent) to 1 (opaque).

Applies to

SetFillColor(nfloat, nfloat, nfloat, nfloat)

Sets the fill color to the specified RGBA values.

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

Parameters

red
nfloat

The red component in the range 0 to 1.

green
nfloat

The green component in the range 0 to 1.

blue
nfloat

The blue component in the range 0 to 1.

alpha
nfloat

The opacity, in the range 0 to 1.

Applies to

SetFillColor(nfloat, nfloat, nfloat, nfloat, nfloat)

Sets the fill color using CMYK color-space components, plus an alpha value.

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

Parameters

cyan
nfloat

The amount of cyan in the range 0 to 1.

magenta
nfloat

The amount of magenta in the range 0 to 1.

yellow
nfloat

The amount of yellow in the range 0 to 1.

black
nfloat

The amount of black in the range 0 to 1.

alpha
nfloat

The opacity in the range 0 to 1.

Applies to