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;
  • Defines the attributed string with label value for this annotation.

    Warning

    If set - Ignores the labelValue.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSAttributedString *attributedText;
  • Defines the font style for text.

    Declaration

    Objective-C

    @property (nonatomic, strong, nonnull) SCIFontStyle *fontStyle;
  • Gets or sets the rotation angle for this text in degrees.

    Declaration

    Objective-C

    @property (nonatomic) float rotationAngle;
  • Returns TickLabel size in Pixels.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGSize drawableSize;
  • The default spacing used when laying out internal text.

    Note

    Sizes are in Points.

    Declaration

    Objective-C

    @property (nonatomic) UIEdgeInsets padding;
  • Returns DrawableText size including margins in Points.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGSize sizeWithMargins;
  • Tries to draw this DrawableText instance onto CGContextRef at specified CGPoint.

    Declaration

    Objective-C

    - (void)tryDrawToCGContext:(nonnull CGContextRef)context;

    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;

    Parameters

    renderContext

    The render context instance to draw on.

    assetManager

    The asset manager associated with render context.

    frame

    The frame to draw text in.