Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Commit

Permalink
fix(ios): clipPath rendering, fixes software-mansion#1131
Browse files Browse the repository at this point in the history
  • Loading branch information
msand committed Oct 7, 2019
1 parent c63f9e2 commit 2534537
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ios/Elements/RNSVGGroup.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ - (void)renderGroupTo:(CGContextRef)context rect:(CGRect)rect
__block CGRect bounds = CGRectNull;

[self traverseSubviews:^(UIView *node) {
if ([node isKindOfClass:[RNSVGMask class]]) {
if ([node isKindOfClass:[RNSVGMask class]] || [node isKindOfClass:[RNSVGClipPath class]]) {
// no-op
} else if ([node isKindOfClass:[RNSVGNode class]]) {
RNSVGNode* svgNode = (RNSVGNode*)node;
Expand Down Expand Up @@ -84,10 +84,10 @@ - (void)renderGroupTo:(CGContextRef)context rect:(CGRect)rect

CGAffineTransform current = CGContextGetCTM(context);
CGAffineTransform svgToClientTransform = CGAffineTransformConcat(current, self.svgView.invInitialCTM);

self.ctm = svgToClientTransform;
self.screenCTM = current;

CGAffineTransform transform = CGAffineTransformConcat(self.matrix, self.transforms);
CGPoint mid = CGPointMake(CGRectGetMidX(bounds), CGRectGetMidY(bounds));
CGPoint center = CGPointApplyAffineTransform(mid, transform);
Expand Down

0 comments on commit 2534537

Please sign in to comment.