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

End cap decorations for lines. More...

#import <CPTLineCap.h>

+ Inheritance diagram for CPTLineCap:
+ Collaboration diagram for CPTLineCap:

Public Class Methods

Factory Methods
(nonnull instancetype) + lineCap
 Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeNone. More...
 
(nonnull instancetype) + openArrowPlotLineCap
 Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeOpenArrow. More...
 
(nonnull instancetype) + solidArrowPlotLineCap
 Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeSolidArrow. More...
 
(nonnull instancetype) + sweptArrowPlotLineCap
 Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeSweptArrow. More...
 
(nonnull instancetype) + rectanglePlotLineCap
 Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeRectangle. More...
 
(nonnull instancetype) + ellipsePlotLineCap
 Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeEllipse. More...
 
(nonnull instancetype) + diamondPlotLineCap
 Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeDiamond. More...
 
(nonnull instancetype) + pentagonPlotLineCap
 Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypePentagon. More...
 
(nonnull instancetype) + hexagonPlotLineCap
 Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeHexagon. More...
 
(nonnull instancetype) + barPlotLineCap
 Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeBar. More...
 
(nonnull instancetype) + crossPlotLineCap
 Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeCross. More...
 
(nonnull instancetype) + snowPlotLineCap
 Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeSnow. More...
 
(nonnull instancetype) + customLineCapWithPath:
 Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeCustom. 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:
 

Public Instance Methods

Drawing
(void) - renderAsVectorInContext:atPoint:inDirection:
 Draws the line cap into the given graphics context centered at the provided point. More...
 
Initialization
(nonnull instancetype) - init [implementation]
 Initializes a newly allocated CPTLineCap 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 <NSCoding>
(id- initWithCoder:
 
(void) - encodeWithCoder:
 

Properties

CGSize size
 The symbol size when the line is drawn in a vertical direction. More...
 
CPTLineCapType lineCapType
 The line cap type. More...
 
CPTLineStylelineStyle
 The line style for the border of the line cap. If nil, the border is not drawn. More...
 
CPTFillfill
 The fill for the interior of the line cap. If nil, the symbol is not filled. More...
 
CGPathRef customLineCapPath
 The drawing path for a custom line cap. It will be scaled to size before being drawn. More...
 
BOOL usesEvenOddClipRule
 If YES, the even-odd rule is used to draw the line cap, otherwise the non-zero winding number rule is used. More...
 

Detailed Description

End cap decorations for lines.

Method Documentation

◆ barPlotLineCap

+ (nonnull instancetype) barPlotLineCap

Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeBar.

Returns
A new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeBar.

◆ crossPlotLineCap

+ (nonnull instancetype) crossPlotLineCap

Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeCross.

Returns
A new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeCross.

◆ customLineCapWithPath:

+ (nonnull instancetype) customLineCapWithPath: (nullable CGPathRef aPath

Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeCustom.

Parameters
aPathThe bounding path for the custom line cap.
Returns
A new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeCustom.

◆ diamondPlotLineCap

+ (nonnull instancetype) diamondPlotLineCap

Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeDiamond.

Returns
A new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeDiamond.

◆ ellipsePlotLineCap

+ (nonnull instancetype) ellipsePlotLineCap

Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeEllipse.

Returns
A new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeEllipse.

◆ hexagonPlotLineCap

+ (nonnull instancetype) hexagonPlotLineCap

Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeHexagon.

Returns
A new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeHexagon.

◆ init

- (nonnull instancetype) init
implementation

Initializes a newly allocated CPTLineCap object.

The initialized object will have the following properties:

Returns
The initialized object.

◆ lineCap

+ (nonnull instancetype) lineCap

Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeNone.

Returns
A new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeNone.

◆ openArrowPlotLineCap

+ (nonnull instancetype) openArrowPlotLineCap

Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeOpenArrow.

Returns
A new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeOpenArrow.

◆ pentagonPlotLineCap

+ (nonnull instancetype) pentagonPlotLineCap

Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypePentagon.

Returns
A new CPTLineCap instance initialized with a line cap type of CPTLineCapTypePentagon.

◆ rectanglePlotLineCap

+ (nonnull instancetype) rectanglePlotLineCap

Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeRectangle.

Returns
A new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeRectangle.

◆ renderAsVectorInContext:atPoint:inDirection:

- (void) renderAsVectorInContext: (nonnull CGContextRef context
atPoint: (CGPoint center
inDirection: (CGPoint direction 

Draws the line cap into the given graphics context centered at the provided point.

Parameters
contextThe graphics context to draw into.
centerThe center point of the line cap.
directionThe direction the line is pointing.

◆ snowPlotLineCap

+ (nonnull instancetype) snowPlotLineCap

Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeSnow.

Returns
A new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeSnow.

◆ solidArrowPlotLineCap

+ (nonnull instancetype) solidArrowPlotLineCap

Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeSolidArrow.

Returns
A new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeSolidArrow.

◆ sweptArrowPlotLineCap

+ (nonnull instancetype) sweptArrowPlotLineCap

Creates and returns a new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeSweptArrow.

Returns
A new CPTLineCap instance initialized with a line cap type of CPTLineCapTypeSweptArrow.

Property Documentation

◆ customLineCapPath

- (nullable CGPathRef) customLineCapPath
readwritenonatomicassign

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

◆ fill

- (nullable CPTFill *) fill
readwritenonatomicstrong

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

◆ lineCapType

- (CPTLineCapType) lineCapType
readwritenonatomicassign

The line cap type.

◆ lineStyle

- (nullable CPTLineStyle *) lineStyle
readwritenonatomicstrong

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

◆ size

- (CGSize) size
readwritenonatomicassign

The symbol size when the line is drawn in a vertical direction.

◆ usesEvenOddClipRule

- (BOOL) usesEvenOddClipRule
readwritenonatomicassign

If YES, the even-odd rule is used to draw the line cap, 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: