mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-04 15:44:24 +00:00
[ios] Fix clipping of images
This commit is contained in:
@@ -122,9 +122,9 @@
|
||||
CGRect imageBounds = CGRectMake(0, 0, _imageSize.width, _imageSize.height);
|
||||
CGAffineTransform viewbox = [RNSVGViewBox getTransform:imageBounds eRect:hitArea align:self.align meetOrSlice:self.meetOrSlice];
|
||||
|
||||
[self clip:context];
|
||||
CGContextTranslateCTM(context, 0, hitArea.size.height);
|
||||
CGContextScaleCTM(context, 1, -1);
|
||||
[self clip:context];
|
||||
CGContextClipToRect(context, hitArea);
|
||||
CGContextConcatCTM(context, viewbox);
|
||||
CGContextDrawImage(context, imageBounds, _image);
|
||||
|
||||
Reference in New Issue
Block a user