setFillColor(red:green:blue:alpha:)
Sets the current fill color to a value in the DeviceRGB color space.
Declaration
func setFillColor(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat)Parameters
- red:
The red intensity value for the color to set. The DeviceRGB color space permits the specification of a value ranging from
0.0(zero intensity) to1.0(full intensity). - green:
The green intensity value for the color to set. The DeviceRGB color space permits the specification of a value ranging from
0.0(zero intensity) to1.0(full intensity). - blue:
The blue intensity value for the color to set. The DeviceRGB color space permits the specification of a value ranging from
0.0(zero intensity) to1.0(full intensity). - alpha:
A value that specifies the opacity level. Values can range from
0.0(transparent) to1.0(opaque). Values outside this range are clipped to0.0or1.0.
Discussion
When you call this function, two things happen:
Core Graphics sets the current fill color space to DeviceRGB.
Core Graphics sets the current fill color to the value specified by the
red,green,blue, andalphaparameters.
See Also
Setting Fill, Stroke, and Shadow Colors
setFillColor(_:)setFillColor(_:)setFillColor(cyan:magenta:yellow:black:alpha:)setFillColor(gray:alpha:)setFillColorSpace(_:)setShadow(offset:blur:)setShadow(offset:blur:color:)setStrokeColor(_:)setStrokeColor(_:)setStrokeColor(cyan:magenta:yellow:black:alpha:)setStrokeColor(gray:alpha:)setStrokeColor(red:green:blue:alpha:)setStrokeColorSpace(_:)setStrokePattern(_:colorComponents:)setAlpha(_:)