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;Swift
func draw(_ rect: CGRect, with context: CGContext)Parameters
rectThe rectangle, specified in user space coordinates.
contextThe 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;Swift
func drawEllipse(with context: CGContext, in rect: CGRect)Parameters
contextThe graphics context to draw on.
rectThe rectangle that defines the area for the ellipse to fit in.
-
Paints a
CGPathRefstroke on passed inCGContextRef.Declaration
Objective-C
- (void)drawPath:(nonnull CGPathRef)path withContext:(nonnull CGContextRef)context inRect:(CGRect)rect;Swift
func draw(_ path: CGPath, with context: CGContext, in rect: CGRect)Parameters
pathThe
CGPathRefinstange to be drawn on thecontextcontextThe graphics context to draw on.
rectA 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;Swift
func drawLines(_ coordinates: UnsafePointer<CGFloat>, count: Int32, with context: CGContext, in rect: CGRect)Parameters
coordinatesArray of points to draw
[x0, y0, x1, y1, x2, y2 ...].countThe amount of points to draw.
contextThe graphics context to draw on.
rectA rectangle defining the portion of the view to draw in.
View on GitHub