iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

SCIBezierCurveInterpolator

@interface SCIBezierCurveInterpolator : NSObject

@property (nonatomic) CGPoint start;

@property (nonatomic) CGPoint a;

@property (nonatomic) CGPoint b;

@property (nonatomic) CGPoint end;

/**
 * Gets interpolated y values for specified x value
 * @param x The x value
 * @return The interpolated y value
 */
- (float)getYForX:(float)x;

/**
 * Calculates approximate length of the bezier curve
 * @return The length of bezier curve
 */
- (float)calculateApproximatedLength;

/**
 * Splits bezier curve at specified t
 * @param t The t values from 0 to 1 to split curve at
 * @param subStart The start point of sub curve
 * @param subA The a control point of sub curve
 * @param subB The b control point of sub curve
 * @param subEnd The end point of sub curve
 */
- (void)divideCurveAtT:(float)t subStart:(CGPoint *)subStart subA:(CGPoint *)subA subB:(CGPoint *)subB subEnd:(CGPoint *)subEnd;

@end

Undocumented

  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) CGPoint start

    Swift

    var start: CGPoint { get set }
  • a

    Undocumented

    Declaration

    Objective-C

    @property (nonatomic) CGPoint a

    Swift

    var a: CGPoint { get set }
  • b

    Undocumented

    Declaration

    Objective-C

    @property (nonatomic) CGPoint b

    Swift

    var b: CGPoint { get set }
  • end

    Undocumented

    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) -> Float

    Parameters

    x

    The x value

    Return Value

    The interpolated y value

  • Calculates approximate length of the bezier curve

    Declaration

    Objective-C

    - (float)calculateApproximatedLength;

    Swift

    func calculateApproximatedLength() -> Float

    Return 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

    t

    The t values from 0 to 1 to split curve at

    subStart

    The start point of sub curve

    subA

    The a control point of sub curve

    subB

    The b control point of sub curve

    subEnd

    The end point of sub curve