iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCIBezierCurveInterpolator
@interface SCIBezierCurveInterpolator : NSObject
Helper class which allows to interpolate value for cubic bezier curve.
-
The start point of the bezier curve.
Declaration
Objective-C
@property (nonatomic) CGPoint start;Swift
var start: CGPoint { get set } -
The a control point of the bezier curve.
Declaration
Objective-C
@property (nonatomic) CGPoint a;Swift
var a: CGPoint { get set } -
The b control point of the bezier curve.
Declaration
Objective-C
@property (nonatomic) CGPoint b;Swift
var b: CGPoint { get set } -
The start point of the bezier curve.
Declaration
Objective-C
@property (nonatomic) CGPoint end;Swift
var end: CGPoint { get set } -
Gets interpolated y values for specified x value.
Declaration
Objective-C
- (float)getYForX:(float)x;Swift
func getYFor(x: Float) -> FloatParameters
xThe x value.
Return Value
The interpolated y value.
-
Calculates approximate length of the bezier curve
Declaration
Objective-C
- (float)calculateApproximatedLength;Swift
func calculateApproximatedLength() -> FloatReturn Value
The length of bezier curve
-
Splits bezier curve at specified t.
Declaration
Objective-C
- (void)divideCurveAtT:(float)t subStart:(nonnull CGPoint *)subStart subA:(nonnull CGPoint *)subA subB:(nonnull CGPoint *)subB subEnd:(nonnull CGPoint *)subEnd;Swift
func divideCurve(atT t: Float, subStart: UnsafeMutablePointer<CGPoint>, subA: UnsafeMutablePointer<CGPoint>, subB: UnsafeMutablePointer<CGPoint>, subEnd: UnsafeMutablePointer<CGPoint>)Parameters
tThe t values from 0 to 1 to split curve at.
subStartThe start point of sub curve.
subAThe a control point of sub curve.
subBThe b control point of sub curve.
subEndThe end point of sub curve.
View on GitHub