Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
|
Macros | |
#define | kCacheSize |
The size of the decimal number cache used by various utility functions. More... | |
Functions | |
int8_t | CPTDecimalCharValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to an 8-bit integer. More... | |
int16_t | CPTDecimalShortValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to a 16-bit integer. More... | |
int32_t | CPTDecimalLongValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to a 32-bit integer. More... | |
int64_t | CPTDecimalLongLongValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to a 64-bit integer. More... | |
int | CPTDecimalIntValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to an int . More... | |
NSInteger | CPTDecimalIntegerValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to an NSInteger. More... | |
uint8_t | CPTDecimalUnsignedCharValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to an unsigned 8-bit integer. More... | |
uint16_t | CPTDecimalUnsignedShortValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to an unsigned 16-bit integer. More... | |
uint32_t | CPTDecimalUnsignedLongValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to an unsigned 32-bit integer. More... | |
uint64_t | CPTDecimalUnsignedLongLongValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to an unsigned 64-bit integer. More... | |
unsigned int | CPTDecimalUnsignedIntValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to an unsigned int . More... | |
NSUInteger | CPTDecimalUnsignedIntegerValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to an NSUInteger. More... | |
float | CPTDecimalFloatValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to a float . More... | |
double | CPTDecimalDoubleValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to a double . More... | |
CGFloat | CPTDecimalCGFloatValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to a CGFloat. More... | |
NSString *__nonnull | CPTDecimalStringValue (NSDecimal decimalNumber) |
Converts an NSDecimal value to an NSString. More... | |
NSDecimal | CPTDecimalFromChar (int8_t anInt) |
Converts an 8-bit integer value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromShort (int16_t anInt) |
Converts a 16-bit integer value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromLong (int32_t anInt) |
Converts a 32-bit integer value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromLongLong (int64_t anInt) |
Converts a 64-bit integer value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromInt (int anInt) |
Converts an int value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromInteger (NSInteger anInt) |
Converts an NSInteger value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromUnsignedChar (uint8_t anInt) |
Converts an unsigned 8-bit integer value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromUnsignedShort (uint16_t anInt) |
Converts an unsigned 16-bit integer value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromUnsignedLong (uint32_t anInt) |
Converts an unsigned 32-bit integer value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromUnsignedLongLong (uint64_t anInt) |
Converts an unsigned 64-bit integer value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromUnsignedInt (unsigned int anInt) |
Converts an unsigned int value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromUnsignedInteger (NSUInteger anInt) |
Converts an NSUInteger value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromFloat (float aFloat) |
Converts a float value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromDouble (double aDouble) |
Converts a double value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromCGFloat (CGFloat aCGFloat) |
Converts a CGFloat value to an NSDecimal. More... | |
NSDecimal | CPTDecimalFromString (NSString *__nonnull stringRepresentation) |
Parses a string and extracts the numeric value as an NSDecimal. More... | |
NSDecimal | CPTDecimalAdd (NSDecimal leftOperand, NSDecimal rightOperand) |
Adds two NSDecimal structs together. More... | |
NSDecimal | CPTDecimalSubtract (NSDecimal leftOperand, NSDecimal rightOperand) |
Subtracts one NSDecimal from another. More... | |
NSDecimal | CPTDecimalMultiply (NSDecimal leftOperand, NSDecimal rightOperand) |
Multiplies two NSDecimal structs together. More... | |
NSDecimal | CPTDecimalDivide (NSDecimal numerator, NSDecimal denominator) |
Divides one NSDecimal by another. More... | |
BOOL | CPTDecimalGreaterThan (NSDecimal leftOperand, NSDecimal rightOperand) |
Checks to see if one NSDecimal is greater than another. More... | |
BOOL | CPTDecimalGreaterThanOrEqualTo (NSDecimal leftOperand, NSDecimal rightOperand) |
Checks to see if one NSDecimal is greater than or equal to another. More... | |
BOOL | CPTDecimalLessThan (NSDecimal leftOperand, NSDecimal rightOperand) |
Checks to see if one NSDecimal is less than another. More... | |
BOOL | CPTDecimalLessThanOrEqualTo (NSDecimal leftOperand, NSDecimal rightOperand) |
Checks to see if one NSDecimal is less than or equal to another. More... | |
BOOL | CPTDecimalEquals (NSDecimal leftOperand, NSDecimal rightOperand) |
Checks to see if one NSDecimal is equal to another. More... | |
NSDecimal | CPTDecimalNaN (void) |
Creates and returns an NSDecimal struct that represents the value “not a number” (NaN ). More... | |
NSDecimal | CPTDecimalMin (NSDecimal leftOperand, NSDecimal rightOperand) |
Determines the smaller of two NSDecimal values. More... | |
NSDecimal | CPTDecimalMax (NSDecimal leftOperand, NSDecimal rightOperand) |
Determines the larger of two NSDecimal values. More... | |
NSDecimal | CPTDecimalAbs (NSDecimal value) |
Determines the absolute value of an NSDecimal value. More... | |
NSRange | CPTExpandedRange (NSRange range, NSInteger expandBy) |
Expands an NSRange by the given amount. More... | |
CPTRGBAColor | CPTRGBAColorFromCGColor (__nonnull CGColorRef color) |
Extracts the color information from a CGColorRef and returns it as a CPTRGBAColor. More... | |
CPTCoordinate | CPTOrthogonalCoordinate (CPTCoordinate coord) |
Determines the CPTCoordinate that is orthogonal to the one provided. More... | |
CGPoint | CPTAlignPointToUserSpace (__nonnull CGContextRef context, CGPoint point) |
Aligns a point in user space to integral coordinates in device space. More... | |
CGSize | CPTAlignSizeToUserSpace (__nonnull CGContextRef context, CGSize size) |
Adjusts a size in user space to integral dimensions in device space. More... | |
CGRect | CPTAlignRectToUserSpace (__nonnull CGContextRef context, CGRect rect) |
Aligns a rectangle in user space to integral coordinates in device space. More... | |
CGPoint | CPTAlignIntegralPointToUserSpace (__nonnull CGContextRef context, CGPoint point) |
Aligns a point in user space between integral coordinates in device space. More... | |
CGRect | CPTAlignIntegralRectToUserSpace (__nonnull CGContextRef context, CGRect rect) |
Aligns a rectangle in user space between integral coordinates in device space. More... | |
CGRect | CPTAlignBorderedRectToUserSpace (__nonnull CGContextRef context, CGRect rect, CPTLineStyle *__nonnull borderLineStyle) |
NSString *__nonnull | CPTStringFromPoint (CGPoint point) |
Creates a string representation of the given point. More... | |
NSString *__nonnull | CPTStringFromSize (CGSize size) |
Creates a string representation of the given size. More... | |
NSString *__nonnull | CPTStringFromRect (CGRect rect) |
Creates a string representation of the given rectangle. More... | |
NSString *__nonnull | CPTStringFromVector (CGVector vector) |
Creates a string representation of the given vector. More... | |
CGFloat | squareOfDistanceBetweenPoints (CGPoint point1, CGPoint point2) |
Computes the square of the distance between two points. More... | |
CPTEdgeInsets | CPTEdgeInsetsMake (CGFloat top, CGFloat left, CGFloat bottom, CGFloat right) |
Returns a CPTEdgeInsets struct with the given insets. More... | |
BOOL | CPTEdgeInsetsEqualToEdgeInsets (CPTEdgeInsets insets1, CPTEdgeInsets insets2) |
Compares two CPTEdgeInsets structstructs. More... | |
double | CPTLogModulus (double value) |
Computes the log modulus of the given value. More... | |
double | CPTInverseLogModulus (double value) |
Computes the inverse log modulus of the given value. More... | |
#define kCacheSize |
The size of the decimal number cache used by various utility functions.
CGRect CPTAlignBorderedRectToUserSpace | ( | __nonnull CGContextRef | context, |
CGRect | rect, | ||
CPTLineStyle *__nonnull | borderLineStyle | ||
) |
CGPoint CPTAlignIntegralPointToUserSpace | ( | __nonnull CGContextRef | context, |
CGPoint | point | ||
) |
Aligns a point in user space between integral coordinates in device space.
Ensures that the x and y coordinates are between pixels in device space.
context | The graphics context. |
point | The point in user space. |
CGRect CPTAlignIntegralRectToUserSpace | ( | __nonnull CGContextRef | context, |
CGRect | rect | ||
) |
Aligns a rectangle in user space between integral coordinates in device space.
Ensures that the x and y coordinates are between pixels in device space and the width and height are an integer number of device pixels.
context | The graphics context. |
rect | The rectangle in user space. |
CGPoint CPTAlignPointToUserSpace | ( | __nonnull CGContextRef | context, |
CGPoint | point | ||
) |
Aligns a point in user space to integral coordinates in device space.
Ensures that the x and y coordinates are at a pixel corner in device space. Drawn from Programming with Quartz by D. Gelphman, B. Laden.
context | The graphics context. |
point | The point in user space. |
CGRect CPTAlignRectToUserSpace | ( | __nonnull CGContextRef | context, |
CGRect | rect | ||
) |
Aligns a rectangle in user space to integral coordinates in device space.
Ensures that the x and y coordinates are at a pixel corner in device space and the width and height are an integer number of device pixels. Drawn from Programming with Quartz by D. Gelphman, B. Laden.
context | The graphics context. |
rect | The rectangle in user space. |
CGSize CPTAlignSizeToUserSpace | ( | __nonnull CGContextRef | context, |
CGSize | size | ||
) |
Adjusts a size in user space to integral dimensions in device space.
Ensures that the width and height are an integer number of device pixels. Drawn from Programming with Quartz by D. Gelphman, B. Laden.
context | The graphics context. |
size | The size in user space. |
Determines the absolute value of an NSDecimal value.
value | The input value for the calculation. |
Adds two NSDecimal structs together.
leftOperand | The left-hand side of the addition operation. |
rightOperand | The right-hand side of the addition operation. |
int8_t CPTDecimalCharValue | ( | NSDecimal | decimalNumber | ) |
Divides one NSDecimal by another.
numerator | The numerator of the multiplication operation. |
denominator | The denominator of the multiplication operation. |
double CPTDecimalDoubleValue | ( | NSDecimal | decimalNumber | ) |
float CPTDecimalFloatValue | ( | NSDecimal | decimalNumber | ) |
NSDecimal CPTDecimalFromChar | ( | int8_t | anInt | ) |
Converts an 8-bit integer value to an NSDecimal.
anInt | The integer value. |
NSDecimal CPTDecimalFromDouble | ( | double | aDouble | ) |
Converts a double
value to an NSDecimal.
aDouble | The double value. |
NSDecimal CPTDecimalFromFloat | ( | float | aFloat | ) |
Converts a float
value to an NSDecimal.
aFloat | The float value. |
NSDecimal CPTDecimalFromInt | ( | int | anInt | ) |
NSDecimal CPTDecimalFromLong | ( | int32_t | anInt | ) |
Converts a 32-bit integer value to an NSDecimal.
anInt | The integer value. |
NSDecimal CPTDecimalFromLongLong | ( | int64_t | anInt | ) |
Converts a 64-bit integer value to an NSDecimal.
anInt | The integer value. |
NSDecimal CPTDecimalFromShort | ( | int16_t | anInt | ) |
Converts a 16-bit integer value to an NSDecimal.
anInt | The integer value. |
Parses a string and extracts the numeric value as an NSDecimal.
stringRepresentation | The string value. |
NSDecimal CPTDecimalFromUnsignedChar | ( | uint8_t | anInt | ) |
Converts an unsigned 8-bit integer value to an NSDecimal.
anInt | The unsigned integer value. |
NSDecimal CPTDecimalFromUnsignedInt | ( | unsigned int | anInt | ) |
Converts an unsigned int
value to an NSDecimal.
anInt | The unsigned int value. |
NSDecimal CPTDecimalFromUnsignedInteger | ( | NSUInteger | anInt | ) |
Converts an NSUInteger value to an NSDecimal.
anInt | The NSUInteger value. |
NSDecimal CPTDecimalFromUnsignedLong | ( | uint32_t | anInt | ) |
Converts an unsigned 32-bit integer value to an NSDecimal.
anInt | The unsigned integer value. |
NSDecimal CPTDecimalFromUnsignedLongLong | ( | uint64_t | anInt | ) |
Converts an unsigned 64-bit integer value to an NSDecimal.
anInt | The unsigned integer value. |
NSDecimal CPTDecimalFromUnsignedShort | ( | uint16_t | anInt | ) |
Converts an unsigned 16-bit integer value to an NSDecimal.
anInt | The unsigned integer value. |
int CPTDecimalIntValue | ( | NSDecimal | decimalNumber | ) |
int64_t CPTDecimalLongLongValue | ( | NSDecimal | decimalNumber | ) |
int32_t CPTDecimalLongValue | ( | NSDecimal | decimalNumber | ) |
Determines the larger of two NSDecimal values.
leftOperand | The first value to compare. |
rightOperand | The second value to compare. |
Determines the smaller of two NSDecimal values.
leftOperand | The first value to compare. |
rightOperand | The second value to compare. |
Multiplies two NSDecimal structs together.
leftOperand | The left-hand side of the multiplication operation. |
rightOperand | The right-hand side of the multiplication operation. |
NSDecimal CPTDecimalNaN | ( | void | ) |
Creates and returns an NSDecimal struct that represents the value “not a number” (NaN
).
Calling NSDecimalIsNotANumber() on this value will return YES.
NaN
). int16_t CPTDecimalShortValue | ( | NSDecimal | decimalNumber | ) |
Subtracts one NSDecimal from another.
leftOperand | The left-hand side of the subtraction operation. |
rightOperand | The right-hand side of the subtraction operation. |
uint8_t CPTDecimalUnsignedCharValue | ( | NSDecimal | decimalNumber | ) |
NSUInteger CPTDecimalUnsignedIntegerValue | ( | NSDecimal | decimalNumber | ) |
Converts an NSDecimal value to an NSUInteger.
decimalNumber | The NSDecimal value. |
unsigned int CPTDecimalUnsignedIntValue | ( | NSDecimal | decimalNumber | ) |
uint64_t CPTDecimalUnsignedLongLongValue | ( | NSDecimal | decimalNumber | ) |
uint32_t CPTDecimalUnsignedLongValue | ( | NSDecimal | decimalNumber | ) |
uint16_t CPTDecimalUnsignedShortValue | ( | NSDecimal | decimalNumber | ) |
BOOL CPTEdgeInsetsEqualToEdgeInsets | ( | CPTEdgeInsets | insets1, |
CPTEdgeInsets | insets2 | ||
) |
Compares two CPTEdgeInsets structstructs.
insets1 | The first inset. |
insets2 | The second inset. |
CPTEdgeInsets CPTEdgeInsetsMake | ( | CGFloat | top, |
CGFloat | left, | ||
CGFloat | bottom, | ||
CGFloat | right | ||
) |
Returns a CPTEdgeInsets struct with the given insets.
top | The top inset. |
left | The left inset. |
bottom | The bottom inset. |
right | The right inset. |
Expands an NSRange by the given amount.
The location
of the resulting NSRange will be non-negative.
range | The NSRange to expand. |
expandBy | The amount the expand the range by. |
double CPTInverseLogModulus | ( | double | value | ) |
Computes the inverse log modulus of the given value.
value | The value. |
double CPTLogModulus | ( | double | value | ) |
Computes the log modulus of the given value.
value | The value. |
CPTCoordinate CPTOrthogonalCoordinate | ( | CPTCoordinate | coord | ) |
Determines the CPTCoordinate that is orthogonal to the one provided.
The current implementation is two-dimensional—X is orthogonal to Y and Y is orthogonal to X.
coord | The CPTCoordinate. |
CPTRGBAColor CPTRGBAColorFromCGColor | ( | __nonnull CGColorRef | color | ) |
Extracts the color information from a CGColorRef and returns it as a CPTRGBAColor.
Supports RGBA and grayscale color spaces.
color | The color. |
Creates a string representation of the given point.
point | The point. |
{x, y}
. Creates a string representation of the given rectangle.
rect | The rectangle. |
{{x, y}, {width, height}}
. Creates a string representation of the given size.
size | The size. |
{width, height}
. NSString* __nonnull CPTStringFromVector | ( | CGVector | vector | ) |
Creates a string representation of the given vector.
vector | The vector. |
{dx, dy}
.