Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
|
Defines an immutable range of plot data. More...
#import <CPTPlotRange.h>
Public Class Methods | |
Factory Methods | |
(nonnull instancetype) | + plotRangeWithLocation:length: |
Creates and returns a new CPTPlotRange instance initialized with the provided location and length. More... | |
(nonnull instancetype) | + plotRangeWithLocationDecimal:lengthDecimal: |
Creates and returns a new CPTPlotRange instance initialized with the provided location and length. 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 | |
Initialization | |
(nonnull instancetype) | - initWithLocation:length: |
Initializes a newly allocated CPTPlotRange object with the provided location and length. More... | |
(nonnull instancetype) | - initWithLocationDecimal:lengthDecimal: |
Initializes a newly allocated CPTPlotRange object with the provided location and length. More... | |
(nullable instancetype) | - initWithCoder: |
Returns an object initialized from data in a given unarchiver. More... | |
(nonnull instancetype) | - init [implementation] |
Initializes a newly allocated CPTPlotRange object. More... | |
Checking Ranges | |
(BOOL) | - contains: |
Determines whether a given number is inside the range. More... | |
(BOOL) | - containsDouble: |
Determines whether a given number is inside the range. More... | |
(BOOL) | - containsNumber: |
Determines whether a given number is inside the range. More... | |
(BOOL) | - isEqualToRange: |
Determines whether a given range is equal to the range of the receiver. More... | |
(BOOL) | - containsRange: |
Determines whether the receiver entirely contains another range. More... | |
(BOOL) | - intersectsRange: |
Determines whether a given range intersects the receiver. More... | |
Range Comparison | |
(CPTPlotRangeComparisonResult) | - compareToNumber: |
Compares a number to the range, determining if it is in the range, or above or below it. More... | |
(CPTPlotRangeComparisonResult) | - compareToDecimal: |
Compares a number to the range, determining if it is in the range, or above or below it. More... | |
(CPTPlotRangeComparisonResult) | - compareToDouble: |
Compares a number to the range, determining if it is in the range, or above or below it. 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 <NSMutableCopying> | |
(id) | - mutableCopyWithZone: |
Public Instance Methods inherited from <NSCoding> | |
(id) | - initWithCoder: |
(void) | - encodeWithCoder: |
Properties | |
Range Limits | |
NSNumber * | location |
The starting value of the range. More... | |
NSNumber * | length |
The length of the range. More... | |
NSNumber * | end |
The ending value of the range, equivalent to location + length. More... | |
NSDecimal | locationDecimal |
The starting value of the range. More... | |
NSDecimal | lengthDecimal |
The length of the range. More... | |
NSDecimal | endDecimal |
The ending value of the range, equivalent to locationDecimal + lengthDecimal. More... | |
double | locationDouble |
The starting value of the range as a double . More... | |
double | lengthDouble |
The length of the range as a double . More... | |
double | endDouble |
The ending value of the range as a double , equivalent to locationDouble + lengthDouble. More... | |
NSNumber * | minLimit |
The minimum extreme value of the range. More... | |
NSNumber * | midPoint |
The middle value of the range. More... | |
NSNumber * | maxLimit |
The maximum extreme value of the range. More... | |
NSDecimal | minLimitDecimal |
The minimum extreme value of the range. More... | |
NSDecimal | midPointDecimal |
The middle value of the range. More... | |
NSDecimal | maxLimitDecimal |
The maximum extreme value of the range. More... | |
double | minLimitDouble |
The minimum extreme value of the range as a double . More... | |
double | midPointDouble |
The middle value of the range as a double . More... | |
double | maxLimitDouble |
The maximum extreme value of the range as a double . More... | |
BOOL | isInfinite |
YES if the length of the range is infinite. More... | |
CPTSign | lengthSign |
The direction (positive or negative) if the length of the range is infinite. More... | |
Defines an immutable range of plot data.
- (CPTPlotRangeComparisonResult) compareToDecimal: | (NSDecimal) | number |
Compares a number to the range, determining if it is in the range, or above or below it.
number | The number to check. |
- (CPTPlotRangeComparisonResult) compareToDouble: | (double) | number |
Compares a number to the range, determining if it is in the range, or above or below it.
number | The number to check. |
- (CPTPlotRangeComparisonResult) compareToNumber: | (nonnull NSNumber *) | number |
Compares a number to the range, determining if it is in the range, or above or below it.
number | The number to check. |
- (BOOL) containsDouble: | (double) | number |
Determines whether a given number is inside the range.
number | The number to check. |
number
≤ endDouble. - (BOOL) containsRange: | (nullable CPTPlotRange *) | otherRange |
Determines whether the receiver entirely contains another range.
otherRange | The range to check. |
|
implementation |
Initializes a newly allocated CPTPlotRange object.
The initialized object will have the following properties:
- (nullable instancetype) initWithCoder: | (nonnull NSCoder *) | decoder |
Returns an object initialized from data in a given unarchiver.
decoder | An unarchiver object. |
- (nonnull instancetype) initWithLocation: | (nonnull NSNumber *) | loc | |
length: | (nonnull NSNumber *) | len | |
Initializes a newly allocated CPTPlotRange object with the provided location and length.
loc | The starting location of the range. |
len | The length of the range. |
Initializes a newly allocated CPTPlotRange object with the provided location and length.
loc | The starting location of the range. |
len | The length of the range. |
- (BOOL) intersectsRange: | (nullable CPTPlotRange *) | otherRange |
Determines whether a given range intersects the receiver.
otherRange | The range to check. |
- (BOOL) isEqualToRange: | (nullable CPTPlotRange *) | otherRange |
Determines whether a given range is equal to the range of the receiver.
otherRange | The range to check. |
+ (nonnull instancetype) plotRangeWithLocation: | (nonnull NSNumber *) | loc | |
length: | (nonnull NSNumber *) | len | |
Creates and returns a new CPTPlotRange instance initialized with the provided location and length.
loc | The starting location of the range. |
len | The length of the range. |
+ (nonnull instancetype) plotRangeWithLocationDecimal: | (NSDecimal) | loc | |
lengthDecimal: | (NSDecimal) | len | |
Creates and returns a new CPTPlotRange instance initialized with the provided location and length.
loc | The starting location of the range. |
len | The length of the range. |
|
readnonatomicstrong |
|
readnonatomicassign |
The ending value of the range, equivalent to locationDecimal + lengthDecimal.
|
readnonatomicassign |
The ending value of the range as a double
, equivalent to locationDouble + lengthDouble.
|
readnonatomicstrong |
The length of the range.
|
readnonatomicassign |
The length of the range.
|
readnonatomicassign |
The length of the range as a double
.
|
readnonatomicassign |
The direction (positive or negative) if the length of the range is infinite.
|
readnonatomicstrong |
The starting value of the range.
|
readnonatomicassign |
The starting value of the range.
|
readnonatomicassign |
The starting value of the range as a double
.
|
readnonatomicstrong |
The maximum extreme value of the range.
|
readnonatomicassign |
The maximum extreme value of the range.
|
readnonatomicassign |
The maximum extreme value of the range as a double
.
|
readnonatomicstrong |
The middle value of the range.
|
readnonatomicassign |
The middle value of the range.
|
readnonatomicassign |
The middle value of the range as a double
.
|
readnonatomicstrong |
The minimum extreme value of the range.
|
readnonatomicassign |
The minimum extreme value of the range.
|
readnonatomicassign |
The minimum extreme value of the range as a double
.