iOS Charting Documentation - SciChart iOS Charts SDK v3.x

ISCIStrokePaint

@protocol ISCIStrokePaint <NSObject>

Defines a protocol which provides a way to draw lines, rects, ellipses or CGPathRef on CGContextRef.

  • Paints a rectangle stroke on passed in CGContextRef.

    Declaration

    Objective-C

    - (void)drawRect:(CGRect)rect inContext:(nonnull CGContextRef)context;

    Swift

    func draw(_ rect: CGRect, in context: CGContext)

    Parameters

    rect

    The rectangle, specified in user space coordinates.

    context

    The graphics context to draw on.

  • Paints an ellipse stroke that fits inside the specified rectangle in passed in.

    Declaration

    Objective-C

    - (void)drawEllipseInRect:(CGRect)rect inContext:(nonnull CGContextRef)context;

    Swift

    func drawEllipse(in rect: CGRect, in context: CGContext)

    Parameters

    rect

    The rectangle that defines the area for the ellipse to fit in.

    context

    The graphics context to draw on.

  • Paints a CGPathRef stroke on passed in CGContextRef.

    Declaration

    Objective-C

    - (void)drawPath:(nonnull CGPathRef)path
           inContext:(nonnull CGContextRef)context;

    Swift

    func draw(_ path: CGPath, in context: CGContext)

    Parameters

    path

    The CGPathRef instange to be drawn on the context

    context

    The graphics context to draw on.

  • Paints lines strokes on passed in CGContextRef.

    Declaration

    Objective-C

    - (void)drawLines:(nonnull CGFloat *)coordinates
                count:(int)count
            inContext:(nonnull CGContextRef)context;

    Swift

    func drawLines(_ coordinates: UnsafeMutablePointer<CGFloat>, count: Int32, in context: CGContext)

    Parameters

    coordinates

    Array of points to draw [x0, y0, x1, y1, x2, y2 ...].

    count

    The amount of points to draw.

    context

    The graphics context to draw on.