iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCIDrawableText
@interface SCIDrawableText : 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 }
-
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
CGContextRef
at specifiedCGPoint
.Declaration
Objective-C
- (void)tryDrawToCGContext:(nonnull CGContextRef)context;
Swift
func tryDraw(to context: CGContext)
Parameters
context
The
CGContextRef
instance 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: ISCIRenderContext2D, assetManager: ISCIAssetManager2D, in frame: CGRect)
Parameters
renderContext
The render context instance to draw on.
assetManager
The asset manager associated with render context.
frame
The frame to draw text in.