CGContext.SetFillColor Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
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.