Global Function

setAlpha()

Declaration

func setAlpha(_ alpha: Double)

Parameters

alpha An alpha value (Double) in the range 0.0 to 1.0.

Returns

-

Description

Set a alpha (transparency) value for drawing operations. A value of 1.0 is opaque, a value of 0.0 is completely transparent.

Examples

// Completely opaque (the default)
setAlpha(1.0)

// 50% transparency
setAlpha(0.5)

Related

fillColor()
fillDisable()
strokeColor()
strokeDisable()
background()