Paints a gradient fill that varies along the line defined by the provided starting and ending points.
- iOS 2.0+
- macOS 10.5+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
- Core Graphics
A graphics context.
A gradient object.
The coordinate that defines the starting point of the gradient.
The coordinate that defines the ending point of the gradient.
The color at location 0 in the CGGradient object is mapped to the starting point. The color at location 1 in the CGGradient object is mapped to the ending point. Colors are linearly interpolated between these two points based on the location values of the gradient. The option flags control whether the gradient is drawn before the start point or after the end point.