Skip to content

Commit

Permalink
fix circle drawing bug in iOS 4s+
Browse files Browse the repository at this point in the history
  • Loading branch information
magicismight committed Apr 28, 2016
1 parent 214af97 commit 12c38d7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ios/RNSVGShape.m
Expand Up @@ -41,12 +41,10 @@ - (CGPathRef)getPath:(CGContextRef)context
CGFloat value = [[prop objectForKey:@"value"] floatValue];
if ([[prop objectForKey:@"percentage"] integerValue] == 1) {
r = sqrt(pow((width * value), 2) + pow((height * value), 2)) / sqrt(2);

} else {
r = value;
}

CGPathAddArc(path, nil, cx, cy, r, -M_PI, M_PI, YES);
CGPathAddArc(path, nil, cx, cy, r, 0, 2*M_PI, YES);
break;
}
case 1:
Expand Down

0 comments on commit 12c38d7

Please sign in to comment.