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

A graph legend entry. More...

#import <CPTLegendEntry.h>

+ Inheritance diagram for CPTLegendEntry:
+ Collaboration diagram for CPTLegendEntry:

Public Instance Methods

Drawing
(void) - drawTitleInRect:inContext:scale:
 Draws the legend title centered vertically in the given rectangle. More...
 
Initialization
(nonnull instancetype) - init [implementation]
 Initializes a newly allocated CPTLegendEntry 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 <NSKeyValueBindingCreation>
(NSArray *) - exposedBindings
 
(Class- valueClassForBinding:
 
(void) - bind:toObject:withKeyPath:options:
 
(NSArray *) - optionDescriptionsForBinding:
 
(NSDictionary *) - infoForBinding:
 
(void) - unbind:
 
- Public Instance Methods inherited from <NSCoding>
(id- initWithCoder:
 
(void) - encodeWithCoder:
 

Properties

Plot Info
CPTPlotplot
 The plot associated with this legend entry. More...
 
NSUInteger index
 The zero-based index of the legend entry for the given plot. More...
 
Formatting
CPTTextStyletextStyle
 The text style used to draw the legend entry title. More...
 
Layout
NSUInteger row
 The row number where this entry appears in the legend (first row is 0). More...
 
NSUInteger column
 The column number where this entry appears in the legend (first column is 0). More...
 
CGSize titleSize
 The size of the legend entry title when drawn using the textStyle. More...
 

Additional Inherited Members

- Public Class Methods inherited from NSObject
(id+ alloc
 
(Class+ class
 
(void) + initialize
 
(void) + load
 
(id+ new
 
- Public Class Methods inherited from <NSKeyValueBindingCreation>
(void) + exposeBinding:
 
- Public Class Methods inherited from <NSSecureCoding>
(BOOL+ supportsSecureCoding:
 

Detailed Description

A graph legend entry.

Method Documentation

◆ drawTitleInRect:inContext:scale:

- (void) drawTitleInRect: (CGRect rect
inContext: (nonnull CGContextRef context
scale: (CGFloat scale 

Draws the legend title centered vertically in the given rectangle.

Parameters
rectThe bounding rectangle where the title should be drawn.
contextThe graphics context to draw into.
scaleThe drawing scale factor. Must be greater than zero (0).

◆ init

- (nonnull instancetype) init
implementation

Initializes a newly allocated CPTLegendEntry object.

The initialized object will have the following properties:

Returns
The initialized object.

Property Documentation

◆ column

- (NSUInteger) column
readwritenonatomicassign

The column number where this entry appears in the legend (first column is 0).

◆ index

- (NSUInteger) index
readwritenonatomicassign

The zero-based index of the legend entry for the given plot.

◆ plot

- (nullable CPTPlot *) plot
readwritenonatomicweak

The plot associated with this legend entry.

◆ row

- (NSUInteger) row
readwritenonatomicassign

The row number where this entry appears in the legend (first row is 0).

◆ textStyle

- (nullable CPTTextStyle *) textStyle
readwritenonatomicstrong

The text style used to draw the legend entry title.

◆ titleSize

- (CGSize) titleSize
readnonatomicassign

The size of the legend entry title when drawn using the textStyle.


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