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;
  • a

    The a control point of the bezier curve.

    Declaration

    Objective-C

    @property (nonatomic) CGPoint a;
  • b

    The b control point of the bezier curve.

    Declaration

    Objective-C

    @property (nonatomic) CGPoint b;
  • end

    The start point of the bezier curve.

    Declaration

    Objective-C

    @property (nonatomic) CGPoint end;
  • Gets interpolated y values for specified x value.

    Declaration

    Objective-C

    - (float)getYForX:(float)x;

    Parameters

    x

    The x value.

    Return Value

    The interpolated y value.

  • Calculates approximate length of the bezier curve

    Declaration

    Objective-C

    - (float)calculateApproximatedLength;

    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;

    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.