Skip to content

Commit

Permalink
[ios] Fix clipping of images
Browse files Browse the repository at this point in the history
  • Loading branch information
msand committed Aug 25, 2018
1 parent 8e0420f commit f1f0e2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/Elements/RNSVGImage.m
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ - (void)renderLayerTo:(CGContextRef)context rect:(CGRect)rect
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);
Expand Down

0 comments on commit f1f0e2f

Please sign in to comment.