@@ -129,22 +129,22 @@ - (void)renderLayerTo:(CGContextRef)context rect:(CGRect)rect
129
129
CGAffineTransform viewbox = [RNSVGViewBox getTransform: imageBounds eRect: hitArea align: self .align meetOrSlice: self .meetOrSlice];
130
130
131
131
[self clip: context];
132
- CGContextTranslateCTM (context, 0 , hitArea.size .height );
133
- CGContextScaleCTM (context, 1 , -1 );
134
132
CGContextClipToRect (context, hitArea);
135
133
CGContextConcatCTM (context, viewbox);
134
+ CGContextTranslateCTM (context, 0 , imageBounds.size .height );
135
+ CGContextScaleCTM (context, 1 , -1 );
136
136
CGContextDrawImage (context, imageBounds, _image);
137
137
CGContextRestoreGState (context);
138
138
139
139
CGRect bounds = hitArea;
140
140
self.clientRect = bounds;
141
-
141
+
142
142
CGAffineTransform current = CGContextGetCTM (context);
143
143
CGAffineTransform svgToClientTransform = CGAffineTransformConcat (current, self.svgView .invInitialCTM );
144
-
144
+
145
145
self.ctm = svgToClientTransform;
146
146
self.screenCTM = current;
147
-
147
+
148
148
CGAffineTransform transform = CGAffineTransformConcat (self.matrix , self.transforms );
149
149
CGPoint mid = CGPointMake (CGRectGetMidX (bounds), CGRectGetMidY (bounds));
150
150
CGPoint center = CGPointApplyAffineTransform (mid, transform);
@@ -159,7 +159,7 @@ - (void)renderLayerTo:(CGContextRef)context rect:(CGRect)rect
159
159
- (CGRect)getHitArea
160
160
{
161
161
CGFloat x = [self relativeOnWidth: self .x];
162
- CGFloat y = - 1 * [self relativeOnHeight: self .y];
162
+ CGFloat y = [self relativeOnHeight: self .y];
163
163
CGFloat width = [self relativeOnWidth: self .imagewidth];
164
164
CGFloat height = [self relativeOnHeight: self .imageheight];
165
165
if (width == 0 ) {
0 commit comments