Authored by Thomas Rasch

o Minor cleanup

@@ -54,16 +54,17 @@ @@ -54,16 +54,17 @@
54 @property (assign) BOOL enableDragging; 54 @property (assign) BOOL enableDragging;
55 @property (assign) BOOL enableRotation; 55 @property (assign) BOOL enableRotation;
56 56
57 -@property (nonatomic, retain) NSObject* data;  
58 -@property (nonatomic, retain) UIView* label;  
59 -@property(nonatomic,retain) UIColor *textForegroundColor;  
60 -@property(nonatomic,retain) UIColor *textBackgroundColor; 57 +@property (nonatomic, retain) NSObject *data;
  58 +@property (nonatomic, retain) UIView *label;
  59 +@property (nonatomic, retain) UIColor *textForegroundColor;
  60 +@property (nonatomic, retain) UIColor *textBackgroundColor;
61 61
62 /// the font used for labels when another font is not explicitly requested; currently [UIFont systemFontOfSize:15] 62 /// the font used for labels when another font is not explicitly requested; currently [UIFont systemFontOfSize:15]
63 + (UIFont *)defaultFont; 63 + (UIFont *)defaultFont;
64 64
65 /// returns RMMarker initialized with #image, and the default anchor point (0.5, 0.5) 65 /// returns RMMarker initialized with #image, and the default anchor point (0.5, 0.5)
66 - (id)initWithUIImage:(UIImage*) image; 66 - (id)initWithUIImage:(UIImage*) image;
  67 +
67 /// \brief returns RMMarker initialized with provided image and anchorPoint. 68 /// \brief returns RMMarker initialized with provided image and anchorPoint.
68 /// #anchorPoint x and y range from 0 to 1, normalized to the width and height of image, 69 /// #anchorPoint x and y range from 0 to 1, normalized to the width and height of image,
69 /// referenced to upper left corner, y increasing top to bottom. To put the image's upper right corner on the marker's 70 /// referenced to upper left corner, y increasing top to bottom. To put the image's upper right corner on the marker's
@@ -72,10 +73,13 @@ @@ -72,10 +73,13 @@
72 73
73 /// changes the labelView to a UILabel with supplied #text and default marker font, using existing text foreground/background color. 74 /// changes the labelView to a UILabel with supplied #text and default marker font, using existing text foreground/background color.
74 - (void)changeLabelUsingText:(NSString *)text; 75 - (void)changeLabelUsingText:(NSString *)text;
  76 +
75 /// changes the labelView to a UILabel with supplied #text and default marker font, positioning the text some weird way i don't understand yet. Uses existing text color/background color. 77 /// changes the labelView to a UILabel with supplied #text and default marker font, positioning the text some weird way i don't understand yet. Uses existing text color/background color.
76 - (void)changeLabelUsingText:(NSString *)text position:(CGPoint)position; 78 - (void)changeLabelUsingText:(NSString *)text position:(CGPoint)position;
  79 +
77 /// changes the labelView to a UILabel with supplied #text and default marker font, changing this marker's text foreground/background colors for this and future text strings. 80 /// changes the labelView to a UILabel with supplied #text and default marker font, changing this marker's text foreground/background colors for this and future text strings.
78 - (void)changeLabelUsingText:(NSString *)text font:(UIFont *)font foregroundColor:(UIColor *)textColor backgroundColor:(UIColor *)backgroundColor; 81 - (void)changeLabelUsingText:(NSString *)text font:(UIFont *)font foregroundColor:(UIColor *)textColor backgroundColor:(UIColor *)backgroundColor;
  82 +
79 /// changes the labelView to a UILabel with supplied #text and default marker font, changing this marker's text foreground/background colors for this and future text strings; modifies position as in #changeLabelUsingText:position. 83 /// changes the labelView to a UILabel with supplied #text and default marker font, changing this marker's text foreground/background colors for this and future text strings; modifies position as in #changeLabelUsingText:position.
80 - (void)changeLabelUsingText:(NSString *)text position:(CGPoint)position font:(UIFont *)font foregroundColor:(UIColor *)textColor backgroundColor:(UIColor *)backgroundColor; 84 - (void)changeLabelUsingText:(NSString *)text position:(CGPoint)position font:(UIFont *)font foregroundColor:(UIColor *)textColor backgroundColor:(UIColor *)backgroundColor;
81 85
@@ -80,6 +80,17 @@ @@ -80,6 +80,17 @@
80 return self; 80 return self;
81 } 81 }
82 82
  83 +- (void)dealloc
  84 +{
  85 + self.data = nil;
  86 + self.label = nil;
  87 + self.textForegroundColor = nil;
  88 + self.textBackgroundColor = nil;
  89 + [super dealloc];
  90 +}
  91 +
  92 +#pragma mark -
  93 +
83 - (void)replaceUIImage:(UIImage *)image 94 - (void)replaceUIImage:(UIImage *)image
84 { 95 {
85 [self replaceUIImage:image anchorPoint:defaultMarkerAnchorPoint]; 96 [self replaceUIImage:image anchorPoint:defaultMarkerAnchorPoint];
@@ -179,15 +190,6 @@ @@ -179,15 +190,6 @@
179 } 190 }
180 } 191 }
181 192
182 -- (void)dealloc  
183 -{  
184 - self.data = nil;  
185 - self.label = nil;  
186 - self.textForegroundColor = nil;  
187 - self.textBackgroundColor = nil;  
188 - [super dealloc];  
189 -}  
190 -  
191 - (void)zoomByFactor:(float)zoomFactor near:(CGPoint)center 193 - (void)zoomByFactor:(float)zoomFactor near:(CGPoint)center
192 { 194 {
193 if (enableDragging) { 195 if (enableDragging) {