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

Defines an immutable range of plot data. More...

#import <CPTPlotRange.h>

+ Inheritance diagram for CPTPlotRange:
+ Collaboration diagram for CPTPlotRange:

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 <NSKeyValueBindingCreation>
(void) + exposeBinding:
 
- 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 <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

Range Limits
NSNumberlocation
 The starting value of the range. More...
 
NSNumberlength
 The length of the range. More...
 
NSNumberend
 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...
 
NSNumberminLimit
 The minimum extreme value of the range. More...
 
NSNumbermidPoint
 The middle value of the range. More...
 
NSNumbermaxLimit
 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...
 

Detailed Description

Defines an immutable range of plot data.

Method Documentation

◆ compareToDecimal:

- (CPTPlotRangeComparisonResult) compareToDecimal: (NSDecimal number

Compares a number to the range, determining if it is in the range, or above or below it.

Parameters
numberThe number to check.
Returns
The comparison result.

◆ compareToDouble:

- (CPTPlotRangeComparisonResult) compareToDouble: (double)  number

Compares a number to the range, determining if it is in the range, or above or below it.

Parameters
numberThe number to check.
Returns
The comparison result.

◆ compareToNumber:

- (CPTPlotRangeComparisonResult) compareToNumber: (nonnull NSNumber *)  number

Compares a number to the range, determining if it is in the range, or above or below it.

Parameters
numberThe number to check.
Returns
The comparison result.

◆ contains:

- (BOOL) contains: (NSDecimal number

Determines whether a given number is inside the range.

Parameters
numberThe number to check.
Returns
YES if locationnumberend.

◆ containsDouble:

- (BOOL) containsDouble: (double)  number

Determines whether a given number is inside the range.

Parameters
numberThe number to check.
Returns
YES if locationDoublenumberendDouble.

◆ containsNumber:

- (BOOL) containsNumber: (nullable NSNumber *)  number

Determines whether a given number is inside the range.

Parameters
numberThe number to check.
Returns
YES if locationnumberend.

◆ containsRange:

- (BOOL) containsRange: (nullable CPTPlotRange *)  otherRange

Determines whether the receiver entirely contains another range.

Parameters
otherRangeThe range to check.
Returns
YES if the other range fits entirely within the range of the receiver.

◆ init

- (nonnull instancetype) init
implementation

Initializes a newly allocated CPTPlotRange object.

The initialized object will have the following properties:

Returns
The initialized object.

◆ initWithCoder:

- (nullable instancetype) initWithCoder: (nonnull NSCoder *)  decoder

Returns an object initialized from data in a given unarchiver.

Parameters
decoderAn unarchiver object.
Returns
An object initialized from data in a given unarchiver.

◆ initWithLocation:length:

- (nonnull instancetype) initWithLocation: (nonnull NSNumber *)  loc
length: (nonnull NSNumber *)  len 

Initializes a newly allocated CPTPlotRange object with the provided location and length.

Parameters
locThe starting location of the range.
lenThe length of the range.
Returns
The initialized CPTPlotRange object.

◆ initWithLocationDecimal:lengthDecimal:

- (nonnull instancetype) initWithLocationDecimal: (NSDecimal loc
lengthDecimal: (NSDecimal len 

Initializes a newly allocated CPTPlotRange object with the provided location and length.

Parameters
locThe starting location of the range.
lenThe length of the range.
Returns
The initialized CPTPlotRange object.

◆ intersectsRange:

- (BOOL) intersectsRange: (nullable CPTPlotRange *)  otherRange

Determines whether a given range intersects the receiver.

Parameters
otherRangeThe range to check.
Returns
YES if the ranges intersect.

◆ isEqualToRange:

- (BOOL) isEqualToRange: (nullable CPTPlotRange *)  otherRange

Determines whether a given range is equal to the range of the receiver.

Parameters
otherRangeThe range to check.
Returns
YES if the ranges both have the same location and length.

◆ plotRangeWithLocation:length:

+ (nonnull instancetype) plotRangeWithLocation: (nonnull NSNumber *)  loc
length: (nonnull NSNumber *)  len 

Creates and returns a new CPTPlotRange instance initialized with the provided location and length.

Parameters
locThe starting location of the range.
lenThe length of the range.
Returns
A new CPTPlotRange instance initialized with the provided location and length.

◆ plotRangeWithLocationDecimal:lengthDecimal:

+ (nonnull instancetype) plotRangeWithLocationDecimal: (NSDecimal loc
lengthDecimal: (NSDecimal len 

Creates and returns a new CPTPlotRange instance initialized with the provided location and length.

Parameters
locThe starting location of the range.
lenThe length of the range.
Returns
A new CPTPlotRange instance initialized with the provided location and length.

Property Documentation

◆ end

- (nonnull NSNumber *) end
readnonatomicstrong

The ending value of the range, equivalent to location + length.

◆ endDecimal

- (NSDecimal) endDecimal
readnonatomicassign

The ending value of the range, equivalent to locationDecimal + lengthDecimal.

◆ endDouble

- (double) endDouble
readnonatomicassign

The ending value of the range as a double, equivalent to locationDouble + lengthDouble.

◆ isInfinite

- (BOOL) isInfinite
readnonatomicassign

YES if the length of the range is infinite.

◆ length

- (nonnull NSNumber *) length
readnonatomicstrong

The length of the range.

See also
lengthDecimal, lengthDouble

◆ lengthDecimal

- (NSDecimal) lengthDecimal
readnonatomicassign

The length of the range.

See also
length, lengthDouble

◆ lengthDouble

- (double) lengthDouble
readnonatomicassign

The length of the range as a double.

See also
length, lengthDecimal

◆ lengthSign

- (CPTSign) lengthSign
readnonatomicassign

The direction (positive or negative) if the length of the range is infinite.

◆ location

- (nonnull NSNumber *) location
readnonatomicstrong

The starting value of the range.

See also
locationDecimal, locationDouble

◆ locationDecimal

- (NSDecimal) locationDecimal
readnonatomicassign

The starting value of the range.

See also
location, locationDouble

◆ locationDouble

- (double) locationDouble
readnonatomicassign

The starting value of the range as a double.

See also
location, locationDecimal

◆ maxLimit

- (nonnull NSNumber *) maxLimit
readnonatomicstrong

The maximum extreme value of the range.

◆ maxLimitDecimal

- (NSDecimal) maxLimitDecimal
readnonatomicassign

The maximum extreme value of the range.

◆ maxLimitDouble

- (double) maxLimitDouble
readnonatomicassign

The maximum extreme value of the range as a double.

◆ midPoint

- (nonnull NSNumber *) midPoint
readnonatomicstrong

The middle value of the range.

◆ midPointDecimal

- (NSDecimal) midPointDecimal
readnonatomicassign

The middle value of the range.

◆ midPointDouble

- (double) midPointDouble
readnonatomicassign

The middle value of the range as a double.

◆ minLimit

- (nonnull NSNumber *) minLimit
readnonatomicstrong

The minimum extreme value of the range.

◆ minLimitDecimal

- (NSDecimal) minLimitDecimal
readnonatomicassign

The minimum extreme value of the range.

◆ minLimitDouble

- (double) minLimitDouble
readnonatomicassign

The minimum extreme value of the range as a double.


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