mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-04 23:54:53 +00:00
Fix strokeWidth hitArea units calculation
This commit is contained in:
@@ -266,7 +266,8 @@
|
|||||||
|
|
||||||
if (self.stroke && self.strokeWidth) {
|
if (self.stroke && self.strokeWidth) {
|
||||||
// Add stroke to hitArea
|
// Add stroke to hitArea
|
||||||
CGPathRef strokePath = CGPathCreateCopyByStrokingPath(hitArea, nil, [self.strokeWidth floatValue], self.strokeLinecap, self.strokeLinejoin, self.strokeMiterlimit);
|
CGFloat width = [self relativeOnOther:self.strokeWidth];
|
||||||
|
CGPathRef strokePath = CGPathCreateCopyByStrokingPath(hitArea, nil, width, self.strokeLinecap, self.strokeLinejoin, self.strokeMiterlimit);
|
||||||
CGPathAddPath(hitArea, nil, strokePath);
|
CGPathAddPath(hitArea, nil, strokePath);
|
||||||
CGPathRelease(strokePath);
|
CGPathRelease(strokePath);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user