mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-07 00:42:31 +00:00
Fix Symbol position
This commit is contained in:
@@ -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];
|
||||||
|
|||||||
Reference in New Issue
Block a user