iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCIAnnotationDrawableText
@interface SCIAnnotationDrawableText
: NSObject <ISCIInvalidatableElement, ISCICleanable>
Provides a class whicih can draw NSAttributedString onto CGContextRef.
-
Defines the string with label value for this annotation.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *text;Swift
var text: String? { get set } -
Defines the attributed string with label value for this annotation.
Warning
If set - Ignores thelabelValue.Declaration
Objective-C
@property (nonatomic, copy, nullable) NSAttributedString *attributedText;Swift
@NSCopying var attributedText: NSAttributedString? { get set } -
Defines the font style for text.
Declaration
Objective-C
@property (nonatomic, strong, nonnull) SCIFontStyle *fontStyle;Swift
var fontStyle: SCIFontStyle { get set } -
Gets or sets the rotation angle for this text in degrees.
Declaration
Objective-C
@property (nonatomic) float rotationAngle;Swift
var rotationAngle: Float { get set } -
Gets or sets the background colour for this text.
Declaration
Objective-C
@property (nonatomic, nonnull) UIColor *backgroundColor;Swift
var backgroundColor: UIColor { get set } -
Returns TickLabel size in
Pixels.Declaration
Objective-C
@property (nonatomic, readonly) CGSize drawableSize;Swift
var drawableSize: CGSize { get } -
The default spacing used when laying out internal text.
Note
Sizes are inPoints.Declaration
Objective-C
@property (nonatomic) UIEdgeInsets padding;Swift
var padding: UIEdgeInsets { get set } -
Returns DrawableText size including margins in
Points.Declaration
Objective-C
@property (nonatomic, readonly) CGSize sizeWithMargins;Swift
var sizeWithMargins: CGSize { get }
-
Tries to draw this DrawableText instance onto
CGContextRefat specifiedCGPoint.Declaration
Objective-C
- (void)tryDrawToCGContext:(nonnull CGContextRef)context;Swift
func tryDraw(to context: CGContext)Parameters
contextThe
CGContextRefinstance to draw text on. -
Draws this text instance inside passed in frame.
Declaration
Objective-C
- (void)onDrawTextWithContext:(nonnull id<ISCIRenderContext2D>)renderContext assetManager:(nonnull id<ISCIAssetManager2D>)assetManager inFrame:(CGRect)frame;Swift
func onDrawText(_ renderContext: any ISCIRenderContext2D, assetManager: any ISCIAssetManager2D, in frame: CGRect)Parameters
renderContextThe render context instance to draw on.
assetManagerThe asset manager associated with render context.
frameThe frame to draw text in.
View on GitHub