
iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.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 withContext:(nonnull CGContextRef)context;
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)drawEllipseWithContext:(nonnull CGContextRef)context inRect:(CGRect)rect;
Parameters
context
The graphics context to draw on.
rect
The rectangle that defines the area for the ellipse to fit in.
-
Paints a
CGPathRef
stroke on passed inCGContextRef
.Declaration
Objective-C
- (void)drawPath:(nonnull CGPathRef)path withContext:(nonnull CGContextRef)context inRect:(CGRect)rect;
Parameters
path
The
CGPathRef
instange to be drawn on thecontext
context
The graphics context to draw on.
rect
A rectangle defining the portion of the view to draw in.
-
Paints lines strokes on passed in
CGContextRef
.Note
Four points per line is used, e.g.: first line - [x0, y0, x1, y1]; second line - [x2, y2, x3, y3];Declaration
Objective-C
- (void)drawLines:(nonnull const CGFloat *)coordinates count:(int)count withContext:(nonnull CGContextRef)context inRect:(CGRect)rect;
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.
rect
A rectangle defining the portion of the view to draw in.