From 12c38d76045f7eff35923f6a42b8f277c3c36b84 Mon Sep 17 00:00:00 2001 From: Horcrux Date: Thu, 28 Apr 2016 23:54:23 +0800 Subject: [PATCH] fix circle drawing bug in iOS 4s+ --- ios/RNSVGShape.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ios/RNSVGShape.m b/ios/RNSVGShape.m index 25f673e42..4c66ad898 100644 --- a/ios/RNSVGShape.m +++ b/ios/RNSVGShape.m @@ -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: