Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTPlotSymbol.h
Go to the documentation of this file.
1 
3 @class CPTLineStyle;
4 @class CPTFill;
5 @class CPTPlotSymbol;
6 @class CPTShadow;
7 
11 typedef NS_ENUM (NSInteger, CPTPlotSymbolType) {
25 };
26 
31 
36 
38 
39 @property (nonatomic, readwrite, assign) CGPoint anchorPoint;
40 @property (nonatomic, readwrite, assign) CGSize size;
41 @property (nonatomic, readwrite, assign) CPTPlotSymbolType symbolType;
42 @property (nonatomic, readwrite, strong, nullable) CPTLineStyle *lineStyle;
43 @property (nonatomic, readwrite, strong, nullable) CPTFill *fill;
44 @property (nonatomic, readwrite, copy, nullable) CPTShadow *shadow;
45 @property (nonatomic, readwrite, assign, nullable) CGPathRef customSymbolPath;
46 @property (nonatomic, readwrite, assign) BOOL usesEvenOddClipRule;
47 
50 +(nonnull instancetype)plotSymbol;
51 +(nonnull instancetype)crossPlotSymbol;
52 +(nonnull instancetype)ellipsePlotSymbol;
53 +(nonnull instancetype)rectanglePlotSymbol;
54 +(nonnull instancetype)plusPlotSymbol;
55 +(nonnull instancetype)starPlotSymbol;
56 +(nonnull instancetype)diamondPlotSymbol;
57 +(nonnull instancetype)trianglePlotSymbol;
58 +(nonnull instancetype)pentagonPlotSymbol;
59 +(nonnull instancetype)hexagonPlotSymbol;
60 +(nonnull instancetype)dashPlotSymbol;
61 +(nonnull instancetype)snowPlotSymbol;
62 +(nonnull instancetype)customPlotSymbolWithPath:(nullable CGPathRef)aPath;
64 
67 -(void)renderInContext:(nonnull CGContextRef)context atPoint:(CGPoint)center scale:(CGFloat)scale alignToPixels:(BOOL)alignToPixels;
68 -(void)renderAsVectorInContext:(nonnull CGContextRef)context atPoint:(CGPoint)center scale:(CGFloat)scale;
70 
71 @end
CPTShadow
Immutable wrapper for various shadow drawing properties.
Definition: CPTShadow.h:3
+[CPTPlotSymbol ellipsePlotSymbol]
nonnull instancetype ellipsePlotSymbol()
Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeE...
Definition: CPTPlotSymbol.m:307
CPTLineStyle
Immutable wrapper for various line drawing properties. Create a CPTMutableLineStyle if you want to cu...
Definition: CPTLineStyle.h:20
CPTMutablePlotSymbolArray
NSMutableArray< CPTPlotSymbol * > CPTMutablePlotSymbolArray
A mutable array of plot symbols.
Definition: CPTPlotSymbol.h:35
CPTPlotSymbolTypeCross
@ CPTPlotSymbolTypeCross
X symbol.
Definition: CPTPlotSymbol.h:20
CPTPlotSymbolTypeDash
@ CPTPlotSymbolTypeDash
Dash symbol.
Definition: CPTPlotSymbol.h:22
NSMutableArray
+[CPTPlotSymbol plusPlotSymbol]
nonnull instancetype plusPlotSymbol()
Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeP...
Definition: CPTPlotSymbol.m:331
+[CPTPlotSymbol crossPlotSymbol]
nonnull instancetype crossPlotSymbol()
Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeC...
Definition: CPTPlotSymbol.m:295
+[CPTPlotSymbol starPlotSymbol]
nonnull instancetype starPlotSymbol()
Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeS...
Definition: CPTPlotSymbol.m:343
CPTPlotSymbol::symbolType
CPTPlotSymbolType symbolType
The symbol type.
Definition: CPTPlotSymbol.h:41
CPTPlotSymbolTypeDiamond
@ CPTPlotSymbolTypeDiamond
Diamond symbol.
Definition: CPTPlotSymbol.h:15
CGPoint
typedef CGPoint
CPTPlotSymbolTypeHexagon
@ CPTPlotSymbolTypeHexagon
Hexagon symbol.
Definition: CPTPlotSymbol.h:19
CPTPlotSymbol::shadow
CPTShadow * shadow
The shadow applied to each plot symbol.
Definition: CPTPlotSymbol.h:44
CPTPlotSymbolTypeStar
@ CPTPlotSymbolTypeStar
5-point star symbol.
Definition: CPTPlotSymbol.h:17
+[CPTPlotSymbol pentagonPlotSymbol]
nonnull instancetype pentagonPlotSymbol()
Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeP...
Definition: CPTPlotSymbol.m:379
CPTPlotSymbol::anchorPoint
CGPoint anchorPoint
The anchor point for the plot symbol. Defaults to (0.5, 0.5) which centers the symbol on the plot poi...
Definition: CPTPlotSymbol.h:39
+[CPTPlotSymbol dashPlotSymbol]
nonnull instancetype dashPlotSymbol()
Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeD...
Definition: CPTPlotSymbol.m:403
CPTFill
Draws area fills.
Definition: CPTFill.h:18
+[CPTPlotSymbol plotSymbol]
nonnull instancetype plotSymbol()
Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeN...
Definition: CPTPlotSymbol.m:283
CPTPlotSymbolTypeCustom
@ CPTPlotSymbolTypeCustom
Custom symbol.
Definition: CPTPlotSymbol.h:24
-[NSObject copy]
id copy
CPTPlotSymbolTypePlus
@ CPTPlotSymbolTypePlus
Plus symbol.
Definition: CPTPlotSymbol.h:21
CPTPlotSymbol::size
CGSize size
The symbol size.
Definition: CPTPlotSymbol.h:40
+[CPTPlotSymbol rectanglePlotSymbol]
nonnull instancetype rectanglePlotSymbol()
Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeR...
Definition: CPTPlotSymbol.m:319
CPTPlotSymbol
Plot symbols for CPTScatterPlot.
Definition: CPTPlotSymbol.h:37
BOOL
typedef BOOL
CGPathRef
typedef CGPathRef
CGContextRef
typedef CGContextRef
CPTPlotSymbolTypePentagon
@ CPTPlotSymbolTypePentagon
Pentagon symbol.
Definition: CPTPlotSymbol.h:18
CPTPlotSymbol::lineStyle
CPTLineStyle * lineStyle
The line style for the border of the symbol. If nil, the border is not drawn.
Definition: CPTPlotSymbol.h:42
+[CPTPlotSymbol diamondPlotSymbol]
nonnull instancetype diamondPlotSymbol()
Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeD...
Definition: CPTPlotSymbol.m:355
CGFloat
typedef CGFloat
CPTPlotSymbolArray
NSArray< CPTPlotSymbol * > CPTPlotSymbolArray
An array of plot symbols.
Definition: CPTPlotSymbol.h:30
CPTPlotSymbol::usesEvenOddClipRule
BOOL usesEvenOddClipRule
If YES, the even-odd rule is used to draw the symbol, otherwise the non-zero winding number rule is u...
Definition: CPTPlotSymbol.h:46
CPTPlotSymbol::customSymbolPath
CGPathRef customSymbolPath
The drawing path for a custom plot symbol. It will be scaled to size before being drawn.
Definition: CPTPlotSymbol.h:45
+[CPTPlotSymbol snowPlotSymbol]
nonnull instancetype snowPlotSymbol()
Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeS...
Definition: CPTPlotSymbol.m:415
NSArray
CPTPlotSymbolType
CPTPlotSymbolType
Plot symbol types.
Definition: CPTPlotSymbol.h:11
CPTPlotSymbolTypeRectangle
@ CPTPlotSymbolTypeRectangle
Rectangle symbol.
Definition: CPTPlotSymbol.h:13
CPTPlotSymbolTypeTriangle
@ CPTPlotSymbolTypeTriangle
Triangle symbol.
Definition: CPTPlotSymbol.h:16
CPTPlotSymbolTypeNone
@ CPTPlotSymbolTypeNone
No symbol.
Definition: CPTPlotSymbol.h:12
+[CPTPlotSymbol hexagonPlotSymbol]
nonnull instancetype hexagonPlotSymbol()
Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeH...
Definition: CPTPlotSymbol.m:391
+[CPTPlotSymbol trianglePlotSymbol]
nonnull instancetype trianglePlotSymbol()
Creates and returns a new CPTPlotSymbol instance initialized with a symbol type of CPTPlotSymbolTypeT...
Definition: CPTPlotSymbol.m:367
CPTPlotSymbolTypeEllipse
@ CPTPlotSymbolTypeEllipse
Elliptical symbol.
Definition: CPTPlotSymbol.h:14
CPTPlotSymbolTypeSnow
@ CPTPlotSymbolTypeSnow
Snowflake symbol.
Definition: CPTPlotSymbol.h:23
NSSecureCoding-p
CPTPlotSymbol::fill
CPTFill * fill
The fill for the interior of the symbol. If nil, the symbol is not filled.
Definition: CPTPlotSymbol.h:43