Instance Method

drawInBezierPath:angle:

Fills the specified path with a linear gradient.

Declaration

- (void)drawInBezierPath:(NSBezierPath *)path angle:(CGFloat)angle;

Parameters

path

The path object to fill.

angle

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

Discussion

This convenience method behaves in a similar way to the drawInRect: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

- drawInRect:angle:

Fills the specified rectangle with a linear gradient.