Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
NSCoder(CPTExtensions) Category Reference

Core Plot extensions to NSCoder. More...

#import <NSCoderExtensions.h>

Public Instance Methods

Encoding Data
(void) - encodeCGFloat:forKey:
 Encodes a CGFloat and associates it with the string key. More...
 
(void) - encodeCPTPoint:forKey:
 Encodes a CGPoint and associates it with the string key. More...
 
(void) - encodeCPTSize:forKey:
 Encodes a CGSize and associates it with the string key. More...
 
(void) - encodeCPTRect:forKey:
 Encodes a CGRect and associates it with the string key. More...
 
(void) - encodeCGColorSpace:forKey:
 Encodes a color space and associates it with the string key. More...
 
(void) - encodeCGPath:forKey:
 Encodes a path and associates it with the string key. More...
 
(void) - encodeCGImage:forKey:
 Encodes an image and associates it with the string key. More...
 
(void) - encodeDecimal:forKey:
 Encodes an NSDecimal and associates it with the string key. More...
 
Decoding Data
(CGFloat- decodeCGFloatForKey:
 Decodes and returns a number that was previously encoded with -encodeCGFloat:forKey: and associated with the string key. More...
 
(CGPoint- decodeCPTPointForKey:
 Decodes and returns a point that was previously encoded with -encodeCPTPoint:forKey: and associated with the string key. More...
 
(CGSize- decodeCPTSizeForKey:
 Decodes and returns a size that was previously encoded with -encodeCPTSize:forKey: and associated with the string key. More...
 
(CGRect- decodeCPTRectForKey:
 Decodes and returns a rectangle that was previously encoded with -encodeCPTRect:forKey: and associated with the string key. More...
 
(nullable CGColorSpaceRef- newCGColorSpaceDecodeForKey:
 Decodes and returns an new color space object that was previously encoded with -encodeCGColorSpace:forKey: and associated with the string key. More...
 
(nullable CGPathRef- newCGPathDecodeForKey:
 Decodes and returns a new path object that was previously encoded with -encodeCGPath:forKey: and associated with the string key. More...
 
(nullable CGImageRef- newCGImageDecodeForKey:
 Decodes and returns a new image object that was previously encoded with -encodeCGImage:forKey: and associated with the string key. More...
 
(NSDecimal- decodeDecimalForKey:
 Decodes and returns a decimal number that was previously encoded with -encodeDecimal:forKey: and associated with the string key. More...
 

Detailed Description

Core Plot extensions to NSCoder.

Method Documentation

◆ decodeCGFloatForKey:

- (CGFloat) decodeCGFloatForKey: (nonnull NSString *)  key

Decodes and returns a number that was previously encoded with -encodeCGFloat:forKey: and associated with the string key.

Parameters
keyThe key associated with the number.
Returns
The number as a CGFloat.

◆ decodeCPTPointForKey:

- (CGPoint) decodeCPTPointForKey: (nonnull NSString *)  key

Decodes and returns a point that was previously encoded with -encodeCPTPoint:forKey: and associated with the string key.

Parameters
keyThe key associated with the point.
Returns
The point.

◆ decodeCPTRectForKey:

- (CGRect) decodeCPTRectForKey: (nonnull NSString *)  key

Decodes and returns a rectangle that was previously encoded with -encodeCPTRect:forKey: and associated with the string key.

Parameters
keyThe key associated with the rectangle.
Returns
The rectangle.

◆ decodeCPTSizeForKey:

- (CGSize) decodeCPTSizeForKey: (nonnull NSString *)  key

Decodes and returns a size that was previously encoded with -encodeCPTSize:forKey: and associated with the string key.

Parameters
keyThe key associated with the size.
Returns
The size.

◆ decodeDecimalForKey:

- (NSDecimal) decodeDecimalForKey: (nonnull NSString *)  key

Decodes and returns a decimal number that was previously encoded with -encodeDecimal:forKey: and associated with the string key.

Parameters
keyThe key associated with the number.
Returns
The number as an NSDecimal.

◆ encodeCGColorSpace:forKey:

- (void) encodeCGColorSpace: (nullable CGColorSpaceRef colorSpace
forKey: (nonnull NSString *)  key 

Encodes a color space and associates it with the string key.

Parameters
colorSpaceThe CGColorSpaceRef to encode.
keyThe key to associate with the color space.
Note
The current implementation only works with named color spaces.

◆ encodeCGFloat:forKey:

- (void) encodeCGFloat: (CGFloat number
forKey: (nonnull NSString *)  key 

Encodes a CGFloat and associates it with the string key.

Parameters
numberThe number to encode.
keyThe key to associate with the number.

◆ encodeCGImage:forKey:

- (void) encodeCGImage: (nullable CGImageRef image
forKey: (nonnull NSString *)  key 

Encodes an image and associates it with the string key.

Parameters
imageThe CGImageRef to encode.
keyThe key to associate with the image.

◆ encodeCGPath:forKey:

- (void) encodeCGPath: (nullable CGPathRef path
forKey: (nonnull NSString *)  key 

Encodes a path and associates it with the string key.

Parameters
pathThe CGPathRef to encode.
keyThe key to associate with the path.

◆ encodeCPTPoint:forKey:

- (void) encodeCPTPoint: (CGPoint point
forKey: (nonnull NSString *)  key 

Encodes a CGPoint and associates it with the string key.

Parameters
pointThe point to encode.
keyThe key to associate with the point.

◆ encodeCPTRect:forKey:

- (void) encodeCPTRect: (CGRect rect
forKey: (nonnull NSString *)  key 

Encodes a CGRect and associates it with the string key.

Parameters
rectThe rectangle to encode.
keyThe key to associate with the rectangle.

◆ encodeCPTSize:forKey:

- (void) encodeCPTSize: (CGSize size
forKey: (nonnull NSString *)  key 

Encodes a CGSize and associates it with the string key.

Parameters
sizeThe size to encode.
keyThe key to associate with the size.

◆ encodeDecimal:forKey:

- (void) encodeDecimal: (NSDecimal number
forKey: (nonnull NSString *)  key 

Encodes an NSDecimal and associates it with the string key.

Parameters
numberThe number to encode.
keyThe key to associate with the number.

◆ newCGColorSpaceDecodeForKey:

- (nullable CGColorSpaceRef) newCGColorSpaceDecodeForKey: (nonnull NSString *)  key

Decodes and returns an new color space object that was previously encoded with -encodeCGColorSpace:forKey: and associated with the string key.

Parameters
keyThe key associated with the color space.
Returns
The new path.
Note
The current implementation only works with named color spaces.

◆ newCGImageDecodeForKey:

- (nullable CGImageRef) newCGImageDecodeForKey: (nonnull NSString *)  key

Decodes and returns a new image object that was previously encoded with -encodeCGImage:forKey: and associated with the string key.

Parameters
keyThe key associated with the image.
Returns
The new image.

◆ newCGPathDecodeForKey:

- (nullable CGPathRef) newCGPathDecodeForKey: (nonnull NSString *)  key

Decodes and returns a new path object that was previously encoded with -encodeCGPath:forKey: and associated with the string key.

Parameters
keyThe key associated with the path.
Returns
The new path.

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