mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-27 12:41:49 +00:00
Fix ClipPath position with Text elements
This commit is contained in:
@@ -16,5 +16,6 @@
|
||||
@interface RNSVGGroup : RNSVGPath <RNSVGContainer>
|
||||
|
||||
- (void)pathRenderLayerTo:(CGContextRef)contex;
|
||||
- (void)renderLayerToWithTransform:(CGContextRef)context transform:(CGAffineTransform)transform;
|
||||
|
||||
@end
|
||||
|
||||
@@ -11,9 +11,16 @@
|
||||
@implementation RNSVGGroup
|
||||
|
||||
- (void)renderLayerTo:(CGContextRef)context
|
||||
{
|
||||
[self renderLayerToWithTransform:context transform:CGAffineTransformIdentity];
|
||||
}
|
||||
|
||||
- (void)renderLayerToWithTransform:(CGContextRef)context transform:(CGAffineTransform)transform
|
||||
{
|
||||
RNSVGSvgView* svg = [self getSvgView];
|
||||
[self clip:context];
|
||||
|
||||
CGContextConcatCTM(context, transform);
|
||||
[self traverseSubviews:^(RNSVGNode *node) {
|
||||
if (node.responsible && !svg.responsible) {
|
||||
svg.responsible = YES;
|
||||
|
||||
Reference in New Issue
Block a user