![]() |
Core Plot (macOS)
Cocoa plotting framework for macOS, iOS, and tvOS
|
Immutable wrapper for various line drawing properties. Create a CPTMutableLineStyle if you want to customize properties. More...
#import <CPTLineStyle.h>
Inheritance diagram for CPTLineStyle:
Collaboration diagram for CPTLineStyle:Public Class Methods | |
Factory Methods | |
| (nonnull instancetype) | + lineStyle |
| Creates and returns a new CPTLineStyle instance. More... | |
| (nonnull instancetype) | + lineStyleWithStyle: |
| Creates and returns a new line style instance initialized from an existing line style. 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) | - setLineStyleInContext: |
| Sets all of the line drawing properties in the given graphics context. More... | |
| (void) | - strokePathInContext: |
| Stroke the current path in the given graphics context. Call -setLineStyleInContext: first to set up the drawing properties. More... | |
| (void) | - strokeRect:inContext: |
| Stroke a rectangular path in the given graphics context. Call -setLineStyleInContext: first to set up the drawing properties. More... | |
Initialization | |
| (nonnull instancetype) | - init [implementation] |
| Initializes a newly allocated CPTLineStyle 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 <NSMutableCopying> | |
| (id) | - mutableCopyWithZone: |
Public Instance Methods inherited from <NSCoding> | |
| (id) | - initWithCoder: |
| (void) | - encodeWithCoder: |
Properties | |
| CGLineCap | lineCap |
| The style for the endpoints of lines drawn in a graphics context. Default is kCGLineCapButt. More... | |
| CGLineJoin | lineJoin |
| The style for the joins of connected lines in a graphics context. Default is kCGLineJoinMiter. More... | |
| CGFloat | miterLimit |
The miter limit for the joins of connected lines in a graphics context. Default is 10.0. More... | |
| CGFloat | lineWidth |
The line width for a graphics context. Default is 1.0. More... | |
| CPTNumberArray * | dashPattern |
| The dash-and-space pattern for the line. Default is nil. More... | |
| CGFloat | patternPhase |
The starting phase of the line dash pattern. Default is 0.0. More... | |
| CPTColor * | lineColor |
| The current stroke color in a context. Default is solid black. More... | |
| CPTFill * | lineFill |
| The current line fill. Default is nil. More... | |
| CPTGradient * | lineGradient |
| The current line gradient fill. Default is nil. More... | |
| BOOL | opaque |
| If YES, a line drawn using the line style is completely opaque. More... | |
Immutable wrapper for various line drawing properties. Create a CPTMutableLineStyle if you want to customize properties.
The line stroke can be drawn three different ways, prioritized in the following order:
|
implementation |
Initializes a newly allocated CPTLineStyle object.
The initialized object will have the following properties:
10.01.00.0| + (nonnull instancetype) lineStyle |
Creates and returns a new CPTLineStyle instance.
| + (nonnull instancetype) lineStyleWithStyle: | (nullable CPTLineStyle *) | lineStyle |
Creates and returns a new line style instance initialized from an existing line style.
The line style will be initialized with values from the given lineStyle.
| lineStyle | An existing CPTLineStyle. |
| - (void) setLineStyleInContext: | (nonnull CGContextRef) | context |
Sets all of the line drawing properties in the given graphics context.
| context | The graphics context. |
| - (void) strokePathInContext: | (nonnull CGContextRef) | context |
Stroke the current path in the given graphics context. Call -setLineStyleInContext: first to set up the drawing properties.
| context | The graphics context. |
| - (void) strokeRect: | (CGRect) | rect | |
| inContext: | (nonnull CGContextRef) | context | |
Stroke a rectangular path in the given graphics context. Call -setLineStyleInContext: first to set up the drawing properties.
| rect | The rectangle to draw. |
| context | The graphics context. |
|
readnonatomicassign |
The dash-and-space pattern for the line. Default is nil.
|
readnonatomicassign |
The style for the endpoints of lines drawn in a graphics context. Default is kCGLineCapButt.
|
readnonatomicassign |
The current stroke color in a context. Default is solid black.
|
readnonatomicassign |
The current line fill. Default is nil.
If nil, the line is drawn using the lineGradient or lineColor.
|
readnonatomicassign |
|
readnonatomicassign |
The style for the joins of connected lines in a graphics context. Default is kCGLineJoinMiter.
|
readnonatomicassign |
The line width for a graphics context. Default is 1.0.
|
readnonatomicassign |
The miter limit for the joins of connected lines in a graphics context. Default is 10.0.
|
readnonatomicassign |
The starting phase of the line dash pattern. Default is 0.0.