Skip to content

Commit

Permalink
Fixed move command issue
Browse files Browse the repository at this point in the history
Some SVG's use a relative move to command as the first command in the path, I dont know why, they should be absolute, so this is a work around for them as they will normally crash the bezier path
  • Loading branch information
curthard89 committed Oct 26, 2014
1 parent c76a83c commit 613bf38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Binary file not shown.
7 changes: 6 additions & 1 deletion source/IJSVGCommandMove.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ + (void)runWithParams:(CGFloat *)params
[[path currentSubpath] moveToPoint:NSMakePoint( params[0], params[1])];
return;
}
[[path currentSubpath] relativeMoveToPoint:NSMakePoint( params[0], params[1])];
@try {
[[path currentSubpath] relativeMoveToPoint:NSMakePoint( params[0], params[1])];
}
@catch (NSException *exception) {
[[path currentSubpath] moveToPoint:NSMakePoint( params[0], params[1])];
}
}

@end

0 comments on commit 613bf38

Please sign in to comment.