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

Plot symbols for CPTScatterPlot. More...

#import <CPTPlotSymbol.h>

+ Inheritance diagram for CPTPlotSymbol:
+ Collaboration diagram for CPTPlotSymbol:

Public Class Methods

Factory Methods
(nonnull instancetype) + plotSymbol
 Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeNone. More...
 
(nonnull instancetype) + crossPlotSymbol
 Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeCross. More...
 
(nonnull instancetype) + ellipsePlotSymbol
 Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeEllipse. More...
 
(nonnull instancetype) + rectanglePlotSymbol
 Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeRectangle. More...
 
(nonnull instancetype) + plusPlotSymbol
 Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypePlus. More...
 
(nonnull instancetype) + starPlotSymbol
 Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeStar. More...
 
(nonnull instancetype) + diamondPlotSymbol
 Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeDiamond. More...
 
(nonnull instancetype) + trianglePlotSymbol
 Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeTriangle. More...
 
(nonnull instancetype) + pentagonPlotSymbol
 Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypePentagon. More...
 
(nonnull instancetype) + hexagonPlotSymbol
 Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeHexagon. More...
 
(nonnull instancetype) + dashPlotSymbol
 Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeDash. More...
 
(nonnull instancetype) + snowPlotSymbol
 Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeSnow. More...
 
(nonnull instancetype) + customPlotSymbolWithPath:
 Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeCustom. More...
 
- 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:
 

Public Instance Methods

Drawing
(void) - renderInContext:atPoint:scale:alignToPixels:
 Draws the plot symbol into the given graphics context centered at the provided point using the cached symbol image. More...
 
(void) - renderAsVectorInContext:atPoint:scale:
 Draws the plot symbol into the given graphics context centered at the provided point. More...
 
Initialization
(nonnull instancetype) - init [implementation]
 Initializes a newly allocated CPTPlotSymbol 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 <NSCopying>
(id- copyWithZone:
 
- Public Instance Methods inherited from <NSCoding>
(id- initWithCoder:
 
(void) - encodeWithCoder:
 

Properties

CGPoint anchorPoint
 The anchor point for the plot symbol. Defaults to (0.5, 0.5) which centers the symbol on the plot point. More...
 
CGSize size
 The symbol size. More...
 
CPTPlotSymbolType symbolType
 The symbol type. More...
 
CPTLineStylelineStyle
 The line style for the border of the symbol. If nil, the border is not drawn. More...
 
CPTFillfill
 The fill for the interior of the symbol. If nil, the symbol is not filled. More...
 
CPTShadowshadow
 The shadow applied to each plot symbol. More...
 
CGPathRef customSymbolPath
 The drawing path for a custom plot symbol. It will be scaled to size before being drawn. More...
 
BOOL usesEvenOddClipRule
 If YES, the even-odd rule is used to draw the symbol, otherwise the non-zero winding number rule is used. More...
 

Detailed Description

Plot symbols for CPTScatterPlot.

Method Documentation

◆ crossPlotSymbol

+ (nonnull instancetype) crossPlotSymbol

Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeCross.

Returns
A new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeCross.

◆ customPlotSymbolWithPath:

+ (nonnull instancetype) customPlotSymbolWithPath: (nullable CGPathRef aPath

Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeCustom.

Parameters
aPathThe bounding path for the custom symbol.
Returns
A new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeCustom.

◆ dashPlotSymbol

+ (nonnull instancetype) dashPlotSymbol

Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeDash.

Returns
A new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeDash.

◆ diamondPlotSymbol

+ (nonnull instancetype) diamondPlotSymbol

Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeDiamond.

Returns
A new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeDiamond.

◆ ellipsePlotSymbol

+ (nonnull instancetype) ellipsePlotSymbol

Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeEllipse.

Returns
A new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeEllipse.

◆ hexagonPlotSymbol

+ (nonnull instancetype) hexagonPlotSymbol

Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeHexagon.

Returns
A new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeHexagon.

◆ init

- (nonnull instancetype) init
implementation

Initializes a newly allocated CPTPlotSymbol object.

The initialized object will have the following properties:

Returns
The initialized object.

◆ pentagonPlotSymbol

+ (nonnull instancetype) pentagonPlotSymbol

Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypePentagon.

Returns
A new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypePentagon.

◆ plotSymbol

+ (nonnull instancetype) plotSymbol

Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeNone.

Returns
A new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeNone.

◆ plusPlotSymbol

+ (nonnull instancetype) plusPlotSymbol

Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypePlus.

Returns
A new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypePlus.

◆ rectanglePlotSymbol

+ (nonnull instancetype) rectanglePlotSymbol

Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeRectangle.

Returns
A new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeRectangle.

◆ renderAsVectorInContext:atPoint:scale:

- (void) renderAsVectorInContext: (nonnull CGContextRef context
atPoint: (CGPoint center
scale: (CGFloat scale 

Draws the plot symbol into the given graphics context centered at the provided point.

Parameters
contextThe graphics context to draw into.
centerThe center point of the symbol.
scaleThe drawing scale factor. Must be greater than zero (0).

◆ renderInContext:atPoint:scale:alignToPixels:

- (void) renderInContext: (nonnull CGContextRef context
atPoint: (CGPoint center
scale: (CGFloat scale
alignToPixels: (BOOL alignToPixels 

Draws the plot symbol into the given graphics context centered at the provided point using the cached symbol image.

Parameters
contextThe graphics context to draw into.
centerThe center point of the symbol.
scaleThe drawing scale factor. Must be greater than zero (0).
alignToPixelsIf YES, the symbol position is aligned with device pixels to reduce anti-aliasing artifacts.

◆ snowPlotSymbol

+ (nonnull instancetype) snowPlotSymbol

Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeSnow.

Returns
A new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeSnow.

◆ starPlotSymbol

+ (nonnull instancetype) starPlotSymbol

Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeStar.

Returns
A new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeStar.

◆ trianglePlotSymbol

+ (nonnull instancetype) trianglePlotSymbol

Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeTriangle.

Returns
A new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeTriangle.

Property Documentation

◆ anchorPoint

- (CGPoint) anchorPoint
readwritenonatomicassign

The anchor point for the plot symbol. Defaults to (0.5, 0.5) which centers the symbol on the plot point.

◆ customSymbolPath

- (nullable CGPathRef) customSymbolPath
readwritenonatomicassign

The drawing path for a custom plot symbol. It will be scaled to size before being drawn.

◆ fill

- (nullable CPTFill *) fill
readwritenonatomicstrong

The fill for the interior of the symbol. If nil, the symbol is not filled.

◆ lineStyle

- (nullable CPTLineStyle *) lineStyle
readwritenonatomicstrong

The line style for the border of the symbol. If nil, the border is not drawn.

◆ shadow

- (nullable CPTShadow *) shadow
readwritenonatomiccopy

The shadow applied to each plot symbol.

◆ size

- (CGSize) size
readwritenonatomicassign

The symbol size.

◆ symbolType

- (CPTPlotSymbolType) symbolType
readwritenonatomicassign

The symbol type.

◆ usesEvenOddClipRule

- (BOOL) usesEvenOddClipRule
readwritenonatomicassign

If YES, the even-odd rule is used to draw the symbol, otherwise the non-zero winding number rule is used.

See also
Filling a Path in the Quartz 2D Programming Guide.

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