mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-03 07:06:04 +00:00
fix circle drawing bug in iOS 4s+
This commit is contained in:
+1
-3
@@ -41,12 +41,10 @@
|
|||||||
CGFloat value = [[prop objectForKey:@"value"] floatValue];
|
CGFloat value = [[prop objectForKey:@"value"] floatValue];
|
||||||
if ([[prop objectForKey:@"percentage"] integerValue] == 1) {
|
if ([[prop objectForKey:@"percentage"] integerValue] == 1) {
|
||||||
r = sqrt(pow((width * value), 2) + pow((height * value), 2)) / sqrt(2);
|
r = sqrt(pow((width * value), 2) + pow((height * value), 2)) / sqrt(2);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
r = value;
|
r = value;
|
||||||
}
|
}
|
||||||
|
CGPathAddArc(path, nil, cx, cy, r, 0, 2*M_PI, YES);
|
||||||
CGPathAddArc(path, nil, cx, cy, r, -M_PI, M_PI, YES);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user