Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTImage.h
Go to the documentation of this file.
1 #import "CPTDefinitions.h"
3 
5 
6 @property (nonatomic, readwrite, copy, nullable) CPTNativeImage *nativeImage;
7 @property (nonatomic, readwrite, assign, nullable) CGImageRef image;
8 @property (nonatomic, readwrite, assign) CGFloat scale;
9 @property (nonatomic, readwrite, assign, getter = isTiled) BOOL tiled;
10 @property (nonatomic, readwrite, assign) CPTEdgeInsets edgeInsets;
11 @property (nonatomic, readwrite, assign) BOOL tileAnchoredToContext;
12 @property (nonatomic, readonly, getter = isOpaque) BOOL opaque;
13 
16 +(nonnull instancetype)imageNamed:(nonnull NSString *)name;
17 
18 +(nonnull instancetype)imageWithNativeImage:(nullable CPTNativeImage *)anImage;
19 +(nonnull instancetype)imageWithContentsOfFile:(nonnull NSString *)path;
20 +(nonnull instancetype)imageWithCGImage:(nullable CGImageRef)anImage scale:(CGFloat)newScale;
21 +(nonnull instancetype)imageWithCGImage:(nullable CGImageRef)anImage;
22 +(nonnull instancetype)imageForPNGFile:(nonnull NSString *)path;
24 
27 -(nonnull instancetype)initWithContentsOfFile:(nonnull NSString *)path;
28 -(nonnull instancetype)initWithCGImage:(nullable CGImageRef)anImage scale:(CGFloat)newScale NS_DESIGNATED_INITIALIZER;
29 -(nonnull instancetype)initWithCGImage:(nullable CGImageRef)anImage;
30 -(nullable instancetype)initWithCoder:(nonnull NSCoder *)decoder NS_DESIGNATED_INITIALIZER;
32 
35 -(void)drawInRect:(CGRect)rect inContext:(nonnull CGContextRef)context;
37 
38 @end
39 
40 #pragma mark -
41 
46 
49 -(nonnull instancetype)initWithNativeImage:(nullable CPTNativeImage *)anImage;
50 -(nonnull instancetype)initForPNGFile:(nonnull NSString *)path;
52 
53 @end
CPTImage(CPTPlatformSpecificImageExtensions)
Platform-specific extensions to CPTImage.
Definition: CPTImage.h:45
CGImageRef
typedef CGImageRef
NSObject
CPTImage::image
CGImageRef image
The image drawn into a CGImageRef.
Definition: CPTImage.h:7
CPTImage::scale
CGFloat scale
The image scale. Must be greater than zero.
Definition: CPTImage.h:8
CPTImage::tiled
BOOL tiled
Draw as a tiled image?
Definition: CPTImage.h:9
CPTImage::tileAnchoredToContext
BOOL tileAnchoredToContext
Anchor the tiled image to the context origin?
Definition: CPTImage.h:11
CPTPlatformSpecificDefines.h
-[NSObject copy]
id copy
CPTImage::nativeImage
CPTNativeImage * nativeImage
A platform-native representation of the image.
Definition: CPTImage.h:6
CGContextRef
typedef CGContextRef
CPTDefinitions.h
CGFloat
typedef CGFloat
CPTImage
A bitmap image.
Definition: CPTImage.h:4
CPTImage::opaque
BOOL opaque
If YES, the image is completely opaque.
Definition: CPTImage.h:12
NSString
CGRect
typedef CGRect
CPTImage::edgeInsets
CPTEdgeInsets edgeInsets
The edge insets for a stretchable image.
Definition: CPTImage.h:10
CPTEdgeInsets
Edge inset distances for stretchable images.
Definition: CPTDefinitions.h:221
NSSecureCoding-p
NSCoder