RMTileImage.h
1.39 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//
// Tile.h
// Images
//
// Created by Joseph Gentle on 13/08/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
//#import <CoreGraphics/CoreGraphics.h>
#import <CoreLocation/CoreLocation.h>
#import "RMTile.h"
@class RMTileImage;
extern NSString * const RMMapImageLoadedNotification;
extern NSString * const RMMapImageLoadingCancelledNotification;
@interface RMTileImage : NSObject {
UIImage *image;
// CGImageRef image;
// I know this is a bit nasty.
RMTile tile;
CGRect screenLocation;
int loadingPriorityCount;
// Used by cache
NSDate *lastUsedTime;
// Only used when appropriate
CALayer *layer;
}
- (id) initWithTile: (RMTile)tile;
+ (RMTileImage*) dummyTile: (RMTile)tile;
//- (id) increaseLoadingPriority;
//- (id) decreaseLoadingPriority;
+ (RMTileImage*)imageWithTile: (RMTile) tile FromURL: (NSString*)url;
+ (RMTileImage*)imageWithTile: (RMTile) tile FromFile: (NSString*)filename;
- (void)drawInRect:(CGRect)rect;
- (void)draw;
- (void)moveBy: (CGSize) delta;
- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center;
- (void)makeLayer;
-(void) cancelLoading;
- (void)setImageToData: (NSData*) data;
-(void) touch;
@property (readwrite, assign) CGRect screenLocation;
@property (readonly, assign) RMTile tile;
@property (readonly) CALayer *layer;
@property (readonly) UIImage *image;
@property (readonly) NSDate *lastUsedTime;
@end