forked from core-plot/core-plot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCPTImage.h
More file actions
53 lines (42 loc) · 1.93 KB
/
CPTImage.h
File metadata and controls
53 lines (42 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#import "CPTDefinitions.h"
#import "CPTPlatformSpecificDefines.h"
@interface CPTImage : NSObject<NSCopying, NSCoding, NSSecureCoding>
@property (nonatomic, readwrite, copy, nullable) CPTNativeImage *nativeImage;
@property (nonatomic, readwrite, assign, nullable) CGImageRef image;
@property (nonatomic, readwrite, assign) CGFloat scale;
@property (nonatomic, readwrite, assign, getter = isTiled) BOOL tiled;
@property (nonatomic, readwrite, assign) CPTEdgeInsets edgeInsets;
@property (nonatomic, readwrite, assign) BOOL tileAnchoredToContext;
@property (nonatomic, readonly, getter = isOpaque) BOOL opaque;
/// @name Factory Methods
/// @{
+(nonnull instancetype)imageNamed:(nonnull NSString *)name;
+(nonnull instancetype)imageWithNativeImage:(nullable CPTNativeImage *)anImage;
+(nonnull instancetype)imageWithContentsOfFile:(nonnull NSString *)path;
+(nonnull instancetype)imageWithCGImage:(nullable CGImageRef)anImage scale:(CGFloat)newScale;
+(nonnull instancetype)imageWithCGImage:(nullable CGImageRef)anImage;
+(nonnull instancetype)imageForPNGFile:(nonnull NSString *)path;
/// @}
/// @name Initialization
/// @{
-(nonnull instancetype)initWithContentsOfFile:(nonnull NSString *)path;
-(nonnull instancetype)initWithCGImage:(nullable CGImageRef)anImage scale:(CGFloat)newScale NS_DESIGNATED_INITIALIZER;
-(nonnull instancetype)initWithCGImage:(nullable CGImageRef)anImage;
-(nullable instancetype)initWithCoder:(nonnull NSCoder *)decoder NS_DESIGNATED_INITIALIZER;
/// @}
/// @name Drawing
/// @{
-(void)drawInRect:(CGRect)rect inContext:(nonnull CGContextRef)context;
/// @}
@end
#pragma mark -
/** @category CPTImage(CPTPlatformSpecificImageExtensions)
* @brief Platform-specific extensions to CPTImage.
**/
@interface CPTImage(CPTPlatformSpecificImageExtensions)
/// @name Initialization
/// @{
-(nonnull instancetype)initWithNativeImage:(nullable CPTNativeImage *)anImage;
-(nonnull instancetype)initForPNGFile:(nonnull NSString *)path;
/// @}
@end