mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
chore: change fabric flag (#1979)
Changed `RN_FABRIC_ENABLED` to `RCT_NEW_ARCH_ENABLED` since it is the current standard for this flag.
This commit is contained in:
@@ -951,7 +951,7 @@ SPEC CHECKSUMS:
|
|||||||
React-rncore: cfeb5532ec459f562410e8058b8f49e07cd215d4
|
React-rncore: cfeb5532ec459f562410e8058b8f49e07cd215d4
|
||||||
React-runtimeexecutor: ac80782d9d76ba2b0f709f4de0c427fe33c352dc
|
React-runtimeexecutor: ac80782d9d76ba2b0f709f4de0c427fe33c352dc
|
||||||
ReactCommon: 20e38a9be5fe1341b5e422220877cc94034776ba
|
ReactCommon: 20e38a9be5fe1341b5e422220877cc94034776ba
|
||||||
RNSVG: f49e247b4ea8b56c27ac52aa92259361b202ba7e
|
RNSVG: 27a7d7438182ca3323de0c57695e3bdaf1aa5eb4
|
||||||
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
|
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
|
||||||
Yoga: c618b544ff8bd8865cdca602f00cbcdb92fd6d31
|
Yoga: c618b544ff8bd8865cdca602f00cbcdb92fd6d31
|
||||||
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ Pod::Spec.new do |s|
|
|||||||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
||||||
}
|
}
|
||||||
s.platforms = { ios: '11.0', tvos: '11.0' }
|
s.platforms = { ios: '11.0', tvos: '11.0' }
|
||||||
s.compiler_flags = folly_compiler_flags + ' -DRN_FABRIC_ENABLED'
|
s.compiler_flags = folly_compiler_flags + ' -DRCT_NEW_ARCH_ENABLED'
|
||||||
s.source_files = 'apple/**/*.{h,m,mm,cpp}'
|
s.source_files = 'apple/**/*.{h,m,mm,cpp}'
|
||||||
s.ios.exclude_files = '**/*.macos.{h,m,mm,cpp}'
|
s.ios.exclude_files = '**/*.macos.{h,m,mm,cpp}'
|
||||||
s.tvos.exclude_files = '**/*.macos.{h,m,mm,cpp}'
|
s.tvos.exclude_files = '**/*.macos.{h,m,mm,cpp}'
|
||||||
|
|||||||
@@ -8,17 +8,17 @@
|
|||||||
|
|
||||||
#import "RNSVGClipPath.h"
|
#import "RNSVGClipPath.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGClipPath
|
@implementation RNSVGClipPath
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -48,7 +48,7 @@ using namespace facebook::react;
|
|||||||
{
|
{
|
||||||
[super prepareForRecycle];
|
[super prepareForRecycle];
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)parseReference
|
- (void)parseReference
|
||||||
{
|
{
|
||||||
@@ -70,9 +70,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGClipPathCls(void)
|
Class<RCTComponentViewProtocol> RNSVGClipPathCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGClipPath.class;
|
return RNSVGClipPath.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -7,17 +7,17 @@
|
|||||||
*/
|
*/
|
||||||
#import "RNSVGDefs.h"
|
#import "RNSVGDefs.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGDefs
|
@implementation RNSVGDefs
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -35,7 +35,7 @@ using namespace facebook::react;
|
|||||||
{
|
{
|
||||||
return concreteComponentDescriptorProvider<RNSVGDefsComponentDescriptor>();
|
return concreteComponentDescriptorProvider<RNSVGDefsComponentDescriptor>();
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)renderTo:(CGContextRef)context
|
- (void)renderTo:(CGContextRef)context
|
||||||
{
|
{
|
||||||
@@ -60,9 +60,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGDefsCls(void)
|
Class<RCTComponentViewProtocol> RNSVGDefsCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGDefs.class;
|
return RNSVGDefs.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -10,17 +10,17 @@
|
|||||||
#import "RNSVGMask.h"
|
#import "RNSVGMask.h"
|
||||||
#import "RNSVGNode.h"
|
#import "RNSVGNode.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGForeignObject
|
@implementation RNSVGForeignObject
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -68,7 +68,7 @@ using namespace facebook::react;
|
|||||||
_foreignObjectheight = nil;
|
_foreignObjectheight = nil;
|
||||||
_foreignObjectwidth = nil;
|
_foreignObjectwidth = nil;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
- (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
|
- (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
|
||||||
{
|
{
|
||||||
return nil;
|
return nil;
|
||||||
@@ -211,9 +211,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGForeignObjectCls(void)
|
Class<RCTComponentViewProtocol> RNSVGForeignObjectCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGForeignObject.class;
|
return RNSVGForeignObject.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -10,19 +10,19 @@
|
|||||||
#import "RNSVGClipPath.h"
|
#import "RNSVGClipPath.h"
|
||||||
#import "RNSVGMask.h"
|
#import "RNSVGMask.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGGroup {
|
@implementation RNSVGGroup {
|
||||||
RNSVGGlyphContext *_glyphContext;
|
RNSVGGlyphContext *_glyphContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -55,7 +55,7 @@ using namespace facebook::react;
|
|||||||
_font = nil;
|
_font = nil;
|
||||||
_glyphContext = nil;
|
_glyphContext = nil;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)setFont:(NSDictionary *)font
|
- (void)setFont:(NSDictionary *)font
|
||||||
{
|
{
|
||||||
@@ -293,9 +293,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGGroupCls(void)
|
Class<RCTComponentViewProtocol> RNSVGGroupCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGGroup.class;
|
return RNSVGGroup.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -15,12 +15,12 @@
|
|||||||
|
|
||||||
#import <React/RCTImageSource.h>
|
#import <React/RCTImageSource.h>
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTImageResponseDelegate.h>
|
#import <React/RCTImageResponseDelegate.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@interface RNSVGImage : RNSVGRenderable
|
@interface RNSVGImage : RNSVGRenderable
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
<RCTImageResponseDelegate>
|
<RCTImageResponseDelegate>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -20,13 +20,13 @@
|
|||||||
#import <React/RCTImageURLLoader.h>
|
#import <React/RCTImageURLLoader.h>
|
||||||
#import <React/RCTImageView.h>
|
#import <React/RCTImageView.h>
|
||||||
|
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
#import <React/RCTBridge.h>
|
#import <React/RCTBridge.h>
|
||||||
#import <React/RCTLog.h>
|
#import <React/RCTLog.h>
|
||||||
#import "RNSVGViewBox.h"
|
#import "RNSVGViewBox.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <React/RCTImageResponseObserverProxy.h>
|
#import <React/RCTImageResponseObserverProxy.h>
|
||||||
@@ -38,19 +38,19 @@
|
|||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
|
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGImage {
|
@implementation RNSVGImage {
|
||||||
CGImageRef _image;
|
CGImageRef _image;
|
||||||
CGSize _imageSize;
|
CGSize _imageSize;
|
||||||
RCTImageLoaderCancellationBlock _reloadImageCancellationBlock;
|
RCTImageLoaderCancellationBlock _reloadImageCancellationBlock;
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
RNSVGImageShadowNode::ConcreteState::Shared _state;
|
RNSVGImageShadowNode::ConcreteState::Shared _state;
|
||||||
RCTImageResponseObserverProxy _imageResponseObserverProxy;
|
RCTImageResponseObserverProxy _imageResponseObserverProxy;
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
}
|
}
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
{
|
{
|
||||||
@@ -58,9 +58,7 @@ using namespace facebook::react;
|
|||||||
static const auto defaultProps = std::make_shared<const RNSVGImageProps>();
|
static const auto defaultProps = std::make_shared<const RNSVGImageProps>();
|
||||||
_props = defaultProps;
|
_props = defaultProps;
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
|
||||||
_imageResponseObserverProxy = RCTImageResponseObserverProxy(self);
|
_imageResponseObserverProxy = RCTImageResponseObserverProxy(self);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@@ -168,11 +166,11 @@ using namespace facebook::react;
|
|||||||
_imageSize = CGSizeZero;
|
_imageSize = CGSizeZero;
|
||||||
_reloadImageCancellationBlock = nil;
|
_reloadImageCancellationBlock = nil;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)setSrc:(RCTImageSource *)src
|
- (void)setSrc:(RCTImageSource *)src
|
||||||
{
|
{
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#else
|
#else
|
||||||
if (src == _src) {
|
if (src == _src) {
|
||||||
return;
|
return;
|
||||||
@@ -201,7 +199,7 @@ using namespace facebook::react;
|
|||||||
[self invalidate];
|
[self invalidate];
|
||||||
});
|
});
|
||||||
}];
|
}];
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setX:(RNSVGLength *)x
|
- (void)setX:(RNSVGLength *)x
|
||||||
@@ -337,9 +335,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGImageCls(void)
|
Class<RCTComponentViewProtocol> RNSVGImageCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGImage.class;
|
return RNSVGImage.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -9,17 +9,17 @@
|
|||||||
#import "RNSVGBrushType.h"
|
#import "RNSVGBrushType.h"
|
||||||
#import "RNSVGPainter.h"
|
#import "RNSVGPainter.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGLinearGradient
|
@implementation RNSVGLinearGradient
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -79,7 +79,7 @@ using namespace facebook::react;
|
|||||||
_gradientUnits = kRNSVGUnitsObjectBoundingBox;
|
_gradientUnits = kRNSVGUnitsObjectBoundingBox;
|
||||||
_gradientTransform = CGAffineTransformIdentity;
|
_gradientTransform = CGAffineTransformIdentity;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (instancetype)init
|
- (instancetype)init
|
||||||
{
|
{
|
||||||
@@ -177,9 +177,9 @@ using namespace facebook::react;
|
|||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGLinearGradientCls(void)
|
Class<RCTComponentViewProtocol> RNSVGLinearGradientCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGLinearGradient.class;
|
return RNSVGLinearGradient.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -11,17 +11,17 @@
|
|||||||
#import "RNSVGPainter.h"
|
#import "RNSVGPainter.h"
|
||||||
#import "RNSVGViewBox.h"
|
#import "RNSVGViewBox.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGMarker
|
@implementation RNSVGMarker
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -79,7 +79,7 @@ using namespace facebook::react;
|
|||||||
_align = nil;
|
_align = nil;
|
||||||
_meetOrSlice = kRNSVGVBMOSMeet;
|
_meetOrSlice = kRNSVGVBMOSMeet;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
|
- (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
|
||||||
{
|
{
|
||||||
@@ -271,9 +271,9 @@ double deg2rad(CGFloat deg)
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGMarkerCls(void)
|
Class<RCTComponentViewProtocol> RNSVGMarkerCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGMarker.class;
|
return RNSVGMarker.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -10,17 +10,17 @@
|
|||||||
#import "RNSVGNode.h"
|
#import "RNSVGNode.h"
|
||||||
#import "RNSVGPainter.h"
|
#import "RNSVGPainter.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGMask
|
@implementation RNSVGMask
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -68,7 +68,7 @@ using namespace facebook::react;
|
|||||||
_maskUnits = kRNSVGUnitsObjectBoundingBox;
|
_maskUnits = kRNSVGUnitsObjectBoundingBox;
|
||||||
_maskContentUnits = kRNSVGUnitsObjectBoundingBox;
|
_maskContentUnits = kRNSVGUnitsObjectBoundingBox;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
|
- (RNSVGPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
|
||||||
{
|
{
|
||||||
@@ -143,9 +143,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGMaskCls(void)
|
Class<RCTComponentViewProtocol> RNSVGMaskCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGMask.class;
|
return RNSVGMask.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -8,19 +8,19 @@
|
|||||||
|
|
||||||
#import "RNSVGPath.h"
|
#import "RNSVGPath.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGPath {
|
@implementation RNSVGPath {
|
||||||
CGPathRef _path;
|
CGPathRef _path;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -57,7 +57,7 @@ using namespace facebook::react;
|
|||||||
_path = nil;
|
_path = nil;
|
||||||
_d = nil;
|
_d = nil;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)setD:(RNSVGPathParser *)d
|
- (void)setD:(RNSVGPathParser *)d
|
||||||
{
|
{
|
||||||
@@ -83,9 +83,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGPathCls(void)
|
Class<RCTComponentViewProtocol> RNSVGPathCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGPath.class;
|
return RNSVGPath.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -10,17 +10,17 @@
|
|||||||
#import "RNSVGNode.h"
|
#import "RNSVGNode.h"
|
||||||
#import "RNSVGPainter.h"
|
#import "RNSVGPainter.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGPattern
|
@implementation RNSVGPattern
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -92,7 +92,7 @@ using namespace facebook::react;
|
|||||||
_align = nil;
|
_align = nil;
|
||||||
_meetOrSlice = kRNSVGVBMOSMeet;
|
_meetOrSlice = kRNSVGVBMOSMeet;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (instancetype)init
|
- (instancetype)init
|
||||||
{
|
{
|
||||||
@@ -252,9 +252,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGPatternCls(void)
|
Class<RCTComponentViewProtocol> RNSVGPatternCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGPattern.class;
|
return RNSVGPattern.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -7,17 +7,17 @@
|
|||||||
*/
|
*/
|
||||||
#import "RNSVGRadialGradient.h"
|
#import "RNSVGRadialGradient.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGRadialGradient
|
@implementation RNSVGRadialGradient
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -81,7 +81,7 @@ using namespace facebook::react;
|
|||||||
_gradientUnits = kRNSVGUnitsObjectBoundingBox;
|
_gradientUnits = kRNSVGUnitsObjectBoundingBox;
|
||||||
_gradientTransform = CGAffineTransformIdentity;
|
_gradientTransform = CGAffineTransformIdentity;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
- (instancetype)init
|
- (instancetype)init
|
||||||
{
|
{
|
||||||
if (self = [super init]) {
|
if (self = [super init]) {
|
||||||
@@ -199,9 +199,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGRadialGradientCls(void)
|
Class<RCTComponentViewProtocol> RNSVGRadialGradientCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGRadialGradient.class;
|
return RNSVGRadialGradient.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -12,18 +12,18 @@
|
|||||||
#import "RNSVGPainter.h"
|
#import "RNSVGPainter.h"
|
||||||
#import "RNSVGVBMOS.h"
|
#import "RNSVGVBMOS.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTViewComponentView.h>
|
#import <React/RCTViewComponentView.h>
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@class RNSVGNode;
|
@class RNSVGNode;
|
||||||
|
|
||||||
@interface RNSVGSvgView :
|
@interface RNSVGSvgView :
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
RCTViewComponentView <RNSVGContainer>
|
RCTViewComponentView <RNSVGContainer>
|
||||||
#else
|
#else
|
||||||
RNSVGView <RNSVGContainer>
|
RNSVGView <RNSVGContainer>
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@property (nonatomic, strong) RNSVGLength *bbWidth;
|
@property (nonatomic, strong) RNSVGLength *bbWidth;
|
||||||
@property (nonatomic, strong) RNSVGLength *bbHeight;
|
@property (nonatomic, strong) RNSVGLength *bbHeight;
|
||||||
|
|||||||
@@ -11,13 +11,13 @@
|
|||||||
#import "RNSVGNode.h"
|
#import "RNSVGNode.h"
|
||||||
#import "RNSVGViewBox.h"
|
#import "RNSVGViewBox.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGSvgView {
|
@implementation RNSVGSvgView {
|
||||||
NSMutableDictionary<NSString *, RNSVGNode *> *_clipPaths;
|
NSMutableDictionary<NSString *, RNSVGNode *> *_clipPaths;
|
||||||
@@ -29,9 +29,9 @@
|
|||||||
bool rendered;
|
bool rendered;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
{
|
{
|
||||||
@@ -42,17 +42,17 @@ using namespace facebook::react;
|
|||||||
self.contentMode = UIViewContentModeRedraw;
|
self.contentMode = UIViewContentModeRedraw;
|
||||||
#endif // TARGET_OS_OSX
|
#endif // TARGET_OS_OSX
|
||||||
rendered = false;
|
rendered = false;
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
static const auto defaultProps = std::make_shared<const RNSVGSvgViewProps>();
|
static const auto defaultProps = std::make_shared<const RNSVGSvgViewProps>();
|
||||||
_props = defaultProps;
|
_props = defaultProps;
|
||||||
// TODO: think if we can do it better
|
// TODO: think if we can do it better
|
||||||
self.opaque = NO;
|
self.opaque = NO;
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#pragma mark - RCTComponentViewProtocol
|
#pragma mark - RCTComponentViewProtocol
|
||||||
|
|
||||||
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
||||||
@@ -108,7 +108,7 @@ using namespace facebook::react;
|
|||||||
_invviewBoxTransform = CGAffineTransformIdentity;
|
_invviewBoxTransform = CGAffineTransformIdentity;
|
||||||
rendered = NO;
|
rendered = NO;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)insertReactSubview:(RNSVGView *)subview atIndex:(NSInteger)atIndex
|
- (void)insertReactSubview:(RNSVGView *)subview atIndex:(NSInteger)atIndex
|
||||||
{
|
{
|
||||||
@@ -427,9 +427,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGSvgViewCls(void)
|
Class<RCTComponentViewProtocol> RNSVGSvgViewCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGSvgView.class;
|
return RNSVGSvgView.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -8,17 +8,17 @@
|
|||||||
#import "RNSVGSymbol.h"
|
#import "RNSVGSymbol.h"
|
||||||
#import "RNSVGViewBox.h"
|
#import "RNSVGViewBox.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGSymbol
|
@implementation RNSVGSymbol
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -63,7 +63,7 @@ using namespace facebook::react;
|
|||||||
_align = nil;
|
_align = nil;
|
||||||
_meetOrSlice = kRNSVGVBMOSMeet;
|
_meetOrSlice = kRNSVGVBMOSMeet;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)setMinX:(CGFloat)minX
|
- (void)setMinX:(CGFloat)minX
|
||||||
{
|
{
|
||||||
@@ -148,9 +148,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGSymbolCls(void)
|
Class<RCTComponentViewProtocol> RNSVGSymbolCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGSymbol.class;
|
return RNSVGSymbol.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -9,17 +9,17 @@
|
|||||||
#import <React/RCTLog.h>
|
#import <React/RCTLog.h>
|
||||||
#import "RNSVGSymbol.h"
|
#import "RNSVGSymbol.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGUse
|
@implementation RNSVGUse
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -65,7 +65,7 @@ using namespace facebook::react;
|
|||||||
_usewidth = nil;
|
_usewidth = nil;
|
||||||
_href = nil;
|
_href = nil;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)setHref:(NSString *)href
|
- (void)setHref:(NSString *)href
|
||||||
{
|
{
|
||||||
@@ -204,9 +204,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGUseCls(void)
|
Class<RCTComponentViewProtocol> RNSVGUseCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGUse.class;
|
return RNSVGUse.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -12,9 +12,9 @@
|
|||||||
#import <React/RCTPointerEvents.h>
|
#import <React/RCTPointerEvents.h>
|
||||||
#import <React/UIView+React.h>
|
#import <React/UIView+React.h>
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTViewComponentView.h>
|
#import <React/RCTViewComponentView.h>
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@class RNSVGGroup;
|
@class RNSVGGroup;
|
||||||
|
|
||||||
@@ -24,11 +24,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@interface RNSVGNode :
|
@interface RNSVGNode :
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
RCTViewComponentView
|
RCTViewComponentView
|
||||||
#else
|
#else
|
||||||
RNSVGView
|
RNSVGView
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
/*
|
/*
|
||||||
N[1/Sqrt[2], 36]
|
N[1/Sqrt[2], 36]
|
||||||
The inverse of the square root of 2.
|
The inverse of the square root of 2.
|
||||||
|
|||||||
@@ -590,7 +590,7 @@ CGFloat const RNSVG_DEFAULT_FONT_SIZE = 12;
|
|||||||
CGPathRelease(_path);
|
CGPathRelease(_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
- (void)prepareForRecycle
|
- (void)prepareForRecycle
|
||||||
{
|
{
|
||||||
[super prepareForRecycle];
|
[super prepareForRecycle];
|
||||||
@@ -652,6 +652,6 @@ CGFloat const RNSVG_DEFAULT_FONT_SIZE = 12;
|
|||||||
CGPathRelease(_path);
|
CGPathRelease(_path);
|
||||||
_path = nil;
|
_path = nil;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ static RNSVGRenderable *_contextElement;
|
|||||||
_strokeDashArrayData = nil;
|
_strokeDashArrayData = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
- (void)prepareForRecycle
|
- (void)prepareForRecycle
|
||||||
{
|
{
|
||||||
[super prepareForRecycle];
|
[super prepareForRecycle];
|
||||||
@@ -220,7 +220,7 @@ static RNSVGRenderable *_contextElement;
|
|||||||
_vectorEffect = kRNSVGVectorEffectDefault;
|
_vectorEffect = kRNSVGVectorEffectDefault;
|
||||||
_propList = nil;
|
_propList = nil;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
UInt32 saturate(CGFloat value)
|
UInt32 saturate(CGFloat value)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,14 +6,14 @@
|
|||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <rnsvg/rnsvg.h>
|
#import <rnsvg/rnsvg.h>
|
||||||
#else
|
#else
|
||||||
#import <React/RCTBridge.h>
|
#import <React/RCTBridge.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@interface RNSVGRenderableModule : NSObject
|
@interface RNSVGRenderableModule : NSObject
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
<NativeSvgRenderableModuleSpec>
|
<NativeSvgRenderableModuleSpec>
|
||||||
#else
|
#else
|
||||||
<RCTBridgeModule>
|
<RCTBridgeModule>
|
||||||
|
|||||||
@@ -20,9 +20,9 @@
|
|||||||
|
|
||||||
RCT_EXPORT_MODULE()
|
RCT_EXPORT_MODULE()
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
@synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED;
|
@synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED;
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
@synthesize bridge = _bridge;
|
@synthesize bridge = _bridge;
|
||||||
|
|
||||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(isPointInFill : (nonnull NSNumber *)reactTag options : (NSDictionary *)options)
|
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(isPointInFill : (nonnull NSNumber *)reactTag options : (NSDictionary *)options)
|
||||||
@@ -196,7 +196,7 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getScreenCTM : (nonnull NSNumber *)reactT
|
|||||||
- (RNSVGPlatformView *)getRenderableView:(NSNumber *)reactTag
|
- (RNSVGPlatformView *)getRenderableView:(NSNumber *)reactTag
|
||||||
{
|
{
|
||||||
__block RNSVGPlatformView *view;
|
__block RNSVGPlatformView *view;
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||||
view = [self.viewRegistry_DEPRECATED viewForReactTag:reactTag];
|
view = [self.viewRegistry_DEPRECATED viewForReactTag:reactTag];
|
||||||
});
|
});
|
||||||
@@ -204,11 +204,11 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getScreenCTM : (nonnull NSNumber *)reactT
|
|||||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||||
view = [self.bridge.uiManager viewForReactTag:reactTag];
|
view = [self.bridge.uiManager viewForReactTag:reactTag];
|
||||||
});
|
});
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
||||||
(const facebook::react::ObjCTurboModule::InitParams &)params
|
(const facebook::react::ObjCTurboModule::InitParams &)params
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,14 +6,14 @@
|
|||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <rnsvg/rnsvg.h>
|
#import <rnsvg/rnsvg.h>
|
||||||
#else
|
#else
|
||||||
#import <React/RCTBridge.h>
|
#import <React/RCTBridge.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@interface RNSVGSvgViewModule : NSObject
|
@interface RNSVGSvgViewModule : NSObject
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
<NativeSvgViewModuleSpec>
|
<NativeSvgViewModuleSpec>
|
||||||
#else
|
#else
|
||||||
<RCTBridgeModule>
|
<RCTBridgeModule>
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
RCT_EXPORT_MODULE()
|
RCT_EXPORT_MODULE()
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
@synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED;
|
@synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED;
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
@synthesize bridge = _bridge;
|
@synthesize bridge = _bridge;
|
||||||
|
|
||||||
- (void)toDataURL:(nonnull NSNumber *)reactTag
|
- (void)toDataURL:(nonnull NSNumber *)reactTag
|
||||||
@@ -27,14 +27,14 @@ RCT_EXPORT_MODULE()
|
|||||||
attempt:(int)attempt
|
attempt:(int)attempt
|
||||||
{
|
{
|
||||||
void (^block)(void) = ^{
|
void (^block)(void) = ^{
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
[self.viewRegistry_DEPRECATED addUIBlock:^(RCTViewRegistry *viewRegistry) {
|
[self.viewRegistry_DEPRECATED addUIBlock:^(RCTViewRegistry *viewRegistry) {
|
||||||
__kindof RNSVGPlatformView *view = [viewRegistry viewForReactTag:reactTag];
|
__kindof RNSVGPlatformView *view = [viewRegistry viewForReactTag:reactTag];
|
||||||
#else
|
#else
|
||||||
[self.bridge.uiManager
|
[self.bridge.uiManager
|
||||||
addUIBlock:^(RCTUIManager *uiManager, NSDictionary<NSNumber *, RNSVGPlatformView *> *viewRegistry) {
|
addUIBlock:^(RCTUIManager *uiManager, NSDictionary<NSNumber *, RNSVGPlatformView *> *viewRegistry) {
|
||||||
__kindof RNSVGPlatformView *view = [uiManager viewForReactTag:reactTag];
|
__kindof RNSVGPlatformView *view = [uiManager viewForReactTag:reactTag];
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
NSString *b64;
|
NSString *b64;
|
||||||
if ([view isKindOfClass:[RNSVGSvgView class]]) {
|
if ([view isKindOfClass:[RNSVGSvgView class]]) {
|
||||||
RNSVGSvgView *svg = view;
|
RNSVGSvgView *svg = view;
|
||||||
@@ -83,7 +83,7 @@ RCT_EXPORT_METHOD(toDataURL
|
|||||||
[self toDataURL:reactTag options:options callback:callback attempt:0];
|
[self toDataURL:reactTag options:options callback:callback attempt:0];
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
||||||
(const facebook::react::ObjCTurboModule::InitParams &)params
|
(const facebook::react::ObjCTurboModule::InitParams &)params
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,17 +9,17 @@
|
|||||||
#import "RNSVGCircle.h"
|
#import "RNSVGCircle.h"
|
||||||
#import <React/RCTLog.h>
|
#import <React/RCTLog.h>
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGCircle
|
@implementation RNSVGCircle
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -57,7 +57,7 @@ using namespace facebook::react;
|
|||||||
_cy = nil;
|
_cy = nil;
|
||||||
_r = nil;
|
_r = nil;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)setCx:(RNSVGLength *)cx
|
- (void)setCx:(RNSVGLength *)cx
|
||||||
{
|
{
|
||||||
@@ -98,9 +98,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGCircleCls(void)
|
Class<RCTComponentViewProtocol> RNSVGCircleCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGCircle.class;
|
return RNSVGCircle.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -9,17 +9,17 @@
|
|||||||
#import "RNSVGEllipse.h"
|
#import "RNSVGEllipse.h"
|
||||||
#import <React/RCTLog.h>
|
#import <React/RCTLog.h>
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGEllipse
|
@implementation RNSVGEllipse
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -59,7 +59,7 @@ using namespace facebook::react;
|
|||||||
_rx = nil;
|
_rx = nil;
|
||||||
_ry = nil;
|
_ry = nil;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)setCx:(RNSVGLength *)cx
|
- (void)setCx:(RNSVGLength *)cx
|
||||||
{
|
{
|
||||||
@@ -110,9 +110,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGEllipseCls(void)
|
Class<RCTComponentViewProtocol> RNSVGEllipseCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGEllipse.class;
|
return RNSVGEllipse.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -9,17 +9,17 @@
|
|||||||
#import "RNSVGLine.h"
|
#import "RNSVGLine.h"
|
||||||
#import <React/RCTLog.h>
|
#import <React/RCTLog.h>
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGLine
|
@implementation RNSVGLine
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -59,7 +59,7 @@ using namespace facebook::react;
|
|||||||
_x2 = nil;
|
_x2 = nil;
|
||||||
_y2 = nil;
|
_y2 = nil;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)setX1:(RNSVGLength *)x1
|
- (void)setX1:(RNSVGLength *)x1
|
||||||
{
|
{
|
||||||
@@ -112,9 +112,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGLineCls(void)
|
Class<RCTComponentViewProtocol> RNSVGLineCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGLine.class;
|
return RNSVGLine.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -9,17 +9,17 @@
|
|||||||
#import "RNSVGRect.h"
|
#import "RNSVGRect.h"
|
||||||
#import <React/RCTLog.h>
|
#import <React/RCTLog.h>
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGRect
|
@implementation RNSVGRect
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -69,7 +69,7 @@ using namespace facebook::react;
|
|||||||
_ry = nil;
|
_ry = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)setX:(RNSVGLength *)x
|
- (void)setX:(RNSVGLength *)x
|
||||||
{
|
{
|
||||||
@@ -165,9 +165,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGRectCls(void)
|
Class<RCTComponentViewProtocol> RNSVGRectCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGRect.class;
|
return RNSVGRect.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -17,13 +17,13 @@
|
|||||||
static NSCharacterSet *RNSVGTSpan_separators = nil;
|
static NSCharacterSet *RNSVGTSpan_separators = nil;
|
||||||
static CGFloat RNSVGTSpan_radToDeg = 180 / (CGFloat)M_PI;
|
static CGFloat RNSVGTSpan_radToDeg = 180 / (CGFloat)M_PI;
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGTSpan {
|
@implementation RNSVGTSpan {
|
||||||
CGFloat startOffset;
|
CGFloat startOffset;
|
||||||
@@ -37,7 +37,7 @@ static CGFloat RNSVGTSpan_radToDeg = 180 / (CGFloat)M_PI;
|
|||||||
RNSVGPathMeasure *measure;
|
RNSVGPathMeasure *measure;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -88,7 +88,7 @@ using namespace facebook::react;
|
|||||||
measure = [[RNSVGPathMeasure alloc] init];
|
measure = [[RNSVGPathMeasure alloc] init];
|
||||||
RNSVGTSpan_separators = [NSCharacterSet whitespaceCharacterSet];
|
RNSVGTSpan_separators = [NSCharacterSet whitespaceCharacterSet];
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (id)init
|
- (id)init
|
||||||
{
|
{
|
||||||
@@ -1117,9 +1117,9 @@ RNSVGTopAlignedLabel *label;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGTSpanCls(void)
|
Class<RCTComponentViewProtocol> RNSVGTSpanCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGTSpan.class;
|
return RNSVGTSpan.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -13,13 +13,13 @@
|
|||||||
#import "RNSVGTextPath.h"
|
#import "RNSVGTextPath.h"
|
||||||
#import "RNSVGTextProperties.h"
|
#import "RNSVGTextProperties.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGText {
|
@implementation RNSVGText {
|
||||||
RNSVGGlyphContext *_glyphContext;
|
RNSVGGlyphContext *_glyphContext;
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
CGFloat cachedAdvance;
|
CGFloat cachedAdvance;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -75,7 +75,7 @@ using namespace facebook::react;
|
|||||||
_baselineShift = nil;
|
_baselineShift = nil;
|
||||||
cachedAdvance = 0;
|
cachedAdvance = 0;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)invalidate
|
- (void)invalidate
|
||||||
{
|
{
|
||||||
@@ -357,9 +357,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGTextCls(void)
|
Class<RCTComponentViewProtocol> RNSVGTextCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGText.class;
|
return RNSVGText.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
@@ -8,17 +8,17 @@
|
|||||||
|
|
||||||
#import "RNSVGTextPath.h"
|
#import "RNSVGTextPath.h"
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
#import <React/RCTConversions.h>
|
#import <React/RCTConversions.h>
|
||||||
#import <React/RCTFabricComponentsPlugins.h>
|
#import <React/RCTFabricComponentsPlugins.h>
|
||||||
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
|
||||||
#import <react/renderer/components/view/conversions.h>
|
#import <react/renderer/components/view/conversions.h>
|
||||||
#import "RNSVGFabricConversions.h"
|
#import "RNSVGFabricConversions.h"
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
@implementation RNSVGTextPath
|
@implementation RNSVGTextPath
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
using namespace facebook::react;
|
using namespace facebook::react;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
@@ -63,7 +63,7 @@ using namespace facebook::react;
|
|||||||
_spacing = nil;
|
_spacing = nil;
|
||||||
_startOffset = nil;
|
_startOffset = nil;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|
||||||
- (void)setHref:(NSString *)href
|
- (void)setHref:(NSString *)href
|
||||||
{
|
{
|
||||||
@@ -141,9 +141,9 @@ using namespace facebook::react;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#ifdef RN_FABRIC_ENABLED
|
#ifdef RCT_NEW_ARCH_ENABLED
|
||||||
Class<RCTComponentViewProtocol> RNSVGTextPathCls(void)
|
Class<RCTComponentViewProtocol> RNSVGTextPathCls(void)
|
||||||
{
|
{
|
||||||
return RNSVGTextPath.class;
|
return RNSVGTextPath.class;
|
||||||
}
|
}
|
||||||
#endif // RN_FABRIC_ENABLED
|
#endif // RCT_NEW_ARCH_ENABLED
|
||||||
|
|||||||
Reference in New Issue
Block a user