mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-06 13:07:36 +00:00
Fix strokeWidth hitArea units calculation
This commit is contained in:
@@ -266,7 +266,8 @@
|
||||
|
||||
if (self.stroke && self.strokeWidth) {
|
||||
// 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);
|
||||
CGPathRelease(strokePath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user