Skip to content

Commit 35995d6

Browse files
committed
Removed editingStringForPlainPath as its use of NSForegroundColorAttributeName was the only thing preventing library from linking under iOS 5.
1 parent c139c9b commit 35995d6

2 files changed

Lines changed: 0 additions & 25 deletions

File tree

SVGgh/SVGRenderer/SVGPathGenerator.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,6 @@ typedef enum SVGPathValidationError
8181
*/
8282
+(CGPathRef) newCGPathFromSVGPath:(NSString*)anSVGPath whileApplyingTransform:(CGAffineTransform)aTransform;
8383

84-
/*! @brief returns an attributed string with the path operators in a different color
85-
* @param plainString a string from a path entity's 'd' attribute
86-
* @return an attributed string with the operator letters colorized
87-
*/
88-
+(NSAttributedString*)editingStringForPlainPlath:(NSString*)plainString;
89-
9084
/*! @brief given a SVG path in text form, return a bounding box (includes control points)
9185
* @param anSVGPath a string from a path entity's 'd' attribute
9286
* @return a rectangle which encapulates all the points on the path and any control points

SVGgh/SVGRenderer/SVGPathGenerator.m

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -156,25 +156,6 @@ +(NSCharacterSet*)invalidPathCharacters
156156
return sResult;
157157
}
158158

159-
+(NSAttributedString*)editingStringForPlainPlath:(NSString*)plainString
160-
{
161-
NSCharacterSet* invalidPathCharacters = [self invalidPathCharacters]; // characters that should never be in an SVG Path
162-
NSString* strippedString = [plainString stringByRemovingCharactersInSet:invalidPathCharacters];
163-
164-
NSDictionary* operatorAttributes = @{NSForegroundColorAttributeName:[[UIColor alloc] initWithHue:203.0/360.0 saturation:1.0 brightness:.73 alpha:1.0]};
165-
166-
NSDictionary* numberAttributes = @{NSForegroundColorAttributeName:[UIColor darkGrayColor]};
167-
168-
NSMutableAttributedString* result = [[NSMutableAttributedString alloc] initWithString:strippedString attributes:numberAttributes];
169-
170-
171-
NSCharacterSet* operatorSet = [NSCharacterSet characterSetWithCharactersInString:@"mMlLtTsScCqQaAzZhHvV"];
172-
173-
[result setAttributes:operatorAttributes forCharactersInSet:operatorSet];
174-
175-
return [result copy];
176-
}
177-
178159
+(CGRect) addPoint:(CGPoint)aPoint toRect:(CGRect)aRect
179160
{
180161
CGRect result = aRect;

0 commit comments

Comments
 (0)