From f1f0e2f18612236686f1f2deec13553b09cd9958 Mon Sep 17 00:00:00 2001 From: Mikael Sand Date: Sat, 25 Aug 2018 12:36:48 +0300 Subject: [PATCH] [ios] Fix clipping of images --- ios/Elements/RNSVGImage.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Elements/RNSVGImage.m b/ios/Elements/RNSVGImage.m index 92895768..fb80ef22 100644 --- a/ios/Elements/RNSVGImage.m +++ b/ios/Elements/RNSVGImage.m @@ -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);