Global Function
Declaration
func strokeColor(red: Double, green: Double, blue: Double, alpha: Double)
func strokeColor(gray: Double, alpha: Double)
func strokeColor(gray: Double)
func strokeColor(color: NSColor)
func strokeColor() -> 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 stroke color in the range 0.0 to 1.0. |
| alpha | A value (Double) in the range 0.0 to 1.0 to define opacity. 1.0 is completely opaque. 0.0 is completely transparent. |
| color | NSColor object to define the stroke color. |
Returns
-
Description
Sets the color used to stroke (outline) shapes. Drawing operations that happen after this function (for example, calling rect or ellipse) will use this color to stroke the shape.
Examples
// Stroke to full red
strokeColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0)
// Stroke to white with 50% transparency
strokeColor(gray: 1.0, alpha: 0.5)
// Fill to white
strokeColor(gray: 1.0)Related
strokeDisable()
fillColor()
fillDisable()
background()