Global Function

background()

Declaration


func background(gray: Double)
func background(red: Double, green: Double, blue: Double)
func background(color: NSColor)

Parameters

gray A grayscale value (Double) in the range 0.0 to 1.0.
red, green, blue red, green, blue color components to define the background color in the range 0.0 to 1.0.
color NSColor object to define the background color.

Returns

-

Description

Sets the color used for the background of the view, and causes a clear operation.

Examples

// Clear the background to white
background(gray: 1.0)

// Clear to white using red, green, blue
background(red: 1.0, green: 1.0, blue: 1.0)

Related