Instance Method


Fills the specified path with a linear gradient.


func draw(in path: NSBezierPath, angle: CGFloat)



The path object to fill.


The angle of the linear gradient, specified in degrees. Positive values indicate rotation in the counter-clockwise direction relative to the horizontal axis.


This convenience method behaves in a similar way to the draw(in:angle:) method, with the path object replacing the rectangle as the clipping region. Like the other method, the start and end colors are guaranteed to be visible at the farthest ends of the path.

The gradient formed by this method is clipped to path.

See Also

Drawing Linear Gradients

func draw(in: NSRect, angle: CGFloat)

Fills the specified rectangle with a linear gradient.