Skip to content

Commit

Permalink
Removed editingStringForPlainPath as its use of NSForegroundColorAttr…
Browse files Browse the repository at this point in the history
…ibuteName was the only thing preventing library from linking under iOS 5.
  • Loading branch information
grhowes committed May 20, 2014
1 parent c139c9b commit 35995d6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
6 changes: 0 additions & 6 deletions SVGgh/SVGRenderer/SVGPathGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ typedef enum SVGPathValidationError
*/
+(CGPathRef) newCGPathFromSVGPath:(NSString*)anSVGPath whileApplyingTransform:(CGAffineTransform)aTransform;

/*! @brief returns an attributed string with the path operators in a different color
* @param plainString a string from a path entity's 'd' attribute
* @return an attributed string with the operator letters colorized
*/
+(NSAttributedString*)editingStringForPlainPlath:(NSString*)plainString;

/*! @brief given a SVG path in text form, return a bounding box (includes control points)
* @param anSVGPath a string from a path entity's 'd' attribute
* @return a rectangle which encapulates all the points on the path and any control points
Expand Down
19 changes: 0 additions & 19 deletions SVGgh/SVGRenderer/SVGPathGenerator.m
Original file line number Diff line number Diff line change
Expand Up @@ -156,25 +156,6 @@ +(NSCharacterSet*)invalidPathCharacters
return sResult;
}

+(NSAttributedString*)editingStringForPlainPlath:(NSString*)plainString
{
NSCharacterSet* invalidPathCharacters = [self invalidPathCharacters]; // characters that should never be in an SVG Path
NSString* strippedString = [plainString stringByRemovingCharactersInSet:invalidPathCharacters];

NSDictionary* operatorAttributes = @{NSForegroundColorAttributeName:[[UIColor alloc] initWithHue:203.0/360.0 saturation:1.0 brightness:.73 alpha:1.0]};

NSDictionary* numberAttributes = @{NSForegroundColorAttributeName:[UIColor darkGrayColor]};

NSMutableAttributedString* result = [[NSMutableAttributedString alloc] initWithString:strippedString attributes:numberAttributes];


NSCharacterSet* operatorSet = [NSCharacterSet characterSetWithCharactersInString:@"mMlLtTsScCqQaAzZhHvV"];

[result setAttributes:operatorAttributes forCharactersInSet:operatorSet];

return [result copy];
}

+(CGRect) addPoint:(CGPoint)aPoint toRect:(CGRect)aRect
{
CGRect result = aRect;
Expand Down

0 comments on commit 35995d6

Please sign in to comment.