iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCIFreehandDrawingAnnotation
@interface SCIFreehandDrawingAnnotation : SCIAnnotationBase
A annotation type representing a freehand brush stroke. Stores a sequence of points that define the drawn path.
-
Defines the stroke style for this brush annotation.
Declaration
Objective-C
@property (nonatomic, strong, nonnull) SCIPenStyle *stroke;Swift
var stroke: SCIPenStyle { get set } -
A unique identifier for this brush annotation.
Declaration
Objective-C
@property (nonatomic, strong, nonnull) NSString *drawId;Swift
var drawId: String { get set } -
Extra padding applied around the selection rectangle.
Declaration
Objective-C
@property (nonatomic) CGFloat selectionOffset;Swift
var selectionOffset: CGFloat { get set } -
Returns the collection of base data values.
Declaration
Objective-C
- (nonnull NSArray<SCIComparablePoint *> *)getBaseDataValues;Swift
func getBaseDataValues() -> [SCIComparablePoint]Return Value
An array of
SCIComparablePointobjects representing the base data values. -
Returns the collection of screen-space points which represent the current freehand path drawn by the modifier.
The points are returned as
SCIComparablePointobjects, with theirxandyvalues converted using the current axis coordinate calculators. If the modifier is not attached to a surface or the calculators are unavailable, the method returns either NaN points (to preserve count) or an empty array.Declaration
Objective-C
- (nonnull NSArray<SCIComparablePoint *> *)getBasePoints;Swift
func getBasePoints() -> [SCIComparablePoint]Return Value
An array of
SCIComparablePointobjects representing the freehand path in screen coordinates. -
Appends a new point to the brush path.
Call this repeatedly while the user is drawing to build the full stroke.
Declaration
Objective-C
- (void)appendPointWithX:(nonnull id<ISCIComparable>)x y:(nonnull id<ISCIComparable>)y;Swift
func appendPointWith(x: any ISCIComparable, y: any ISCIComparable)Parameters
xThe x‑coordinate in data space (must conform to ISCIComparable).
yThe y‑coordinate in data space (must conform to ISCIComparable).
-
Clears all points from the brush path, effectively resetting the annotation. After calling this, the annotation will no longer render until new points are added.
Declaration
Objective-C
- (void)clearPoints;Swift
func clearPoints()
View on GitHub