Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTMutableTextStyle Class Reference

Mutable wrapper for text style properties. More...

#import <CPTMutableTextStyle.h>

+ Inheritance diagram for CPTMutableTextStyle:
+ Collaboration diagram for CPTMutableTextStyle:

Public Class Methods

(nonnull instancetype) + textStyleWithAttributes: [implementation]
 Creates and returns a new CPTMutableTextStyle instance initialized from a dictionary of text attributes. More...
 
- Public Class Methods inherited from CPTTextStyle
(nonnull instancetype) + textStyle
 Creates and returns a new CPTTextStyle instance. More...
 
(nonnull instancetype) + textStyleWithStyle:
 Creates and returns a new text style instance initialized from an existing text style. More...
 
- Public Class Methods inherited from NSObject
(id+ alloc
 
(Class+ class
 
(void) + initialize
 
(void) + load
 
(id+ new
 
- Public Class Methods inherited from <NSSecureCoding>
(BOOL+ supportsSecureCoding:
 

Properties

CPTNativeFontfont
 The font. Default is nil. More...
 
NSStringfontName
 The font name. Default is Helvetica. Ignored if font is not nil. More...
 
CGFloat fontSize
 The font size. Default is 12.0. Ignored if font is not nil. More...
 
CPTColorcolor
 The current text color. Default is solid black. More...
 
CPTTextAlignment textAlignment
 The paragraph alignment for multi-line text. Default is CPTTextAlignmentLeft. More...
 
NSLineBreakMode lineBreakMode
 The line break mode used when laying out the text. Default is NSLineBreakByWordWrapping . More...
 
- Properties inherited from CPTTextStyle
CPTNativeFontfont
 The font. Default is nil. More...
 
NSStringfontName
 The font name. Default is Helvetica. Ignored if font is not nil. More...
 
CGFloat fontSize
 The font size. Default is 12.0. Ignored if font is not nil. More...
 
CPTColorcolor
 The current text color. Default is solid black. More...
 
CPTTextAlignment textAlignment
 The paragraph alignment for multi-line text. Default is CPTTextAlignmentLeft. More...
 
NSLineBreakMode lineBreakMode
 The line break mode used when laying out the text. Default is NSLineBreakByWordWrapping . More...
 
CPTDictionaryattributes
 A dictionary of standard text attributes suitable for formatting an NSAttributedString. More...
 

Additional Inherited Members

- Public Instance Methods inherited from CPTTextStyle
(nonnull instancetype) - init [implementation]
 Initializes a newly allocated CPTTextStyle object. More...
 
- Public Instance Methods inherited from NSObject
(Class- classForCoder
 
(id- copy
 
(void) - dealloc
 
(void) - finalize
 
(id- init
 
(id- mutableCopy
 
- Public Instance Methods inherited from <NSObject>
(NSString *) - description
 
(NSUInteger- hash
 
(BOOL- isEqual:
 
- Public Instance Methods inherited from <NSCopying>
(id- copyWithZone:
 
- Public Instance Methods inherited from <NSMutableCopying>
(id- mutableCopyWithZone:
 
- Public Instance Methods inherited from <NSCoding>
(id- initWithCoder:
 
(void) - encodeWithCoder:
 

Detailed Description

Mutable wrapper for text style properties.

Use this whenever you need to customize the properties of a text style.

Method Documentation

◆ textStyleWithAttributes:

+ (nonnull instancetype) textStyleWithAttributes: (nullable CPTDictionary *)  attributes
implementation

Creates and returns a new CPTMutableTextStyle instance initialized from a dictionary of text attributes.

The text style will be initalized with values associated with the following keys:

Properties associated with missing keys will be inialized to their default values.

Parameters
attributesA dictionary of standard text attributes.
Returns
A new CPTMutableTextStyle instance.

Reimplemented from CPTTextStyle.

Provided by category CPTMutableTextStyle(CPTPlatformSpecificMutableTextStyleExtensions).

Property Documentation

◆ color

- (nullable CPTColor *) color
readwritenonatomiccopy

The current text color. Default is solid black.

◆ font

- (CPTNativeFont *) font
readwritenonatomicstrong

The font. Default is nil.

Font will override fontName and fontSize if not nil.

◆ fontName

- (nullable NSString *) fontName
readwritenonatomiccopy

The font name. Default is Helvetica. Ignored if font is not nil.

◆ fontSize

- (CGFloat) fontSize
readwritenonatomicassign

The font size. Default is 12.0. Ignored if font is not nil.

◆ lineBreakMode

- (NSLineBreakMode) lineBreakMode
readwritenonatomicassign

The line break mode used when laying out the text. Default is NSLineBreakByWordWrapping .

◆ textAlignment

- (CPTTextAlignment) textAlignment
readwritenonatomicassign

The paragraph alignment for multi-line text. Default is CPTTextAlignmentLeft.


The documentation for this class was generated from the following files: