Fix Symbol position

This commit is contained in:
Horcrux
2017-11-08 01:14:45 +08:00
parent ebeba450c8
commit 5b2972f8f6
+2 -1
View File
@@ -80,13 +80,14 @@
- (void)renderSymbolTo:(CGContextRef)context width:(CGFloat)width height:(CGFloat)height - (void)renderSymbolTo:(CGContextRef)context width:(CGFloat)width height:(CGFloat)height
{ {
if (self.align) { if (self.align) {
CGRect eRect = CGRectMake([self getContextLeft], [self getContextTop], width, height); CGRect eRect = CGRectMake(0, 0, width, height);
CGAffineTransform viewBoxTransform = [RNSVGViewBox getTransform:CGRectMake(self.minX, self.minY, self.vbWidth, self.vbHeight) CGAffineTransform viewBoxTransform = [RNSVGViewBox getTransform:CGRectMake(self.minX, self.minY, self.vbWidth, self.vbHeight)
eRect:eRect eRect:eRect
align:self.align align:self.align
meetOrSlice:self.meetOrSlice meetOrSlice:self.meetOrSlice
fromSymbol:YES]; fromSymbol:YES];
CGContextConcatCTM(context, viewBoxTransform); CGContextConcatCTM(context, viewBoxTransform);
} }
[self renderGroupTo:context]; [self renderGroupTo:context];