Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
Nick | 90a90a1271 | |
Nick | 299743212e | |
Nick | d8ccbe67a6 |
|
@ -4,22 +4,6 @@
|
|||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libBVLinearGradient.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libBVLinearGradient.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libBVLinearGradient.a</string>
|
||||
|
@ -39,6 +23,22 @@
|
|||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libBVLinearGradient.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libBVLinearGradient.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -4,22 +4,6 @@
|
|||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNCAsyncStorage.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libRNCAsyncStorage.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNCAsyncStorage.a</string>
|
||||
|
@ -39,6 +23,22 @@
|
|||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNCAsyncStorage.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libRNCAsyncStorage.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -4,6 +4,22 @@
|
|||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNDateTimePicker.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libRNDateTimePicker.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNDateTimePicker.a</string>
|
||||
|
@ -23,22 +39,6 @@
|
|||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNDateTimePicker.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libRNDateTimePicker.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -4,6 +4,22 @@
|
|||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNDeviceInfo.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libRNDeviceInfo.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNDeviceInfo.a</string>
|
||||
|
@ -23,22 +39,6 @@
|
|||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNDeviceInfo.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libRNDeviceInfo.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -4,6 +4,22 @@
|
|||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNGestureHandler.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libRNGestureHandler.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNGestureHandler.a</string>
|
||||
|
@ -23,22 +39,6 @@
|
|||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNGestureHandler.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libRNGestureHandler.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,48 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNOpenAppSettings.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libRNOpenAppSettings.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNOpenAppSettings.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libRNOpenAppSettings.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,7 +0,0 @@
|
|||
#import <React/RCTBridgeModule.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface RNOpenAppSettings : NSObject <RCTBridgeModule>
|
||||
|
||||
@end
|
||||
|
Binary file not shown.
|
@ -1,7 +0,0 @@
|
|||
#import <React/RCTBridgeModule.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface RNOpenAppSettings : NSObject <RCTBridgeModule>
|
||||
|
||||
@end
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -4,22 +4,6 @@
|
|||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNSVG.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libRNSVG.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNSVG.a</string>
|
||||
|
@ -39,6 +23,22 @@
|
|||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>libRNSVG.a</string>
|
||||
<key>HeadersPath</key>
|
||||
<string>Headers</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>libRNSVG.a</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
|
|
|
@ -6,29 +6,33 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import <CoreText/CoreText.h>
|
||||
#import "RCTConvert+RNSVG.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import <React/RCTConvert.h>
|
||||
#import "RCTConvert+RNSVG.h"
|
||||
#import "RNSVGCGFCRule.h"
|
||||
#import "RNSVGVBMOS.h"
|
||||
#import "RNSVGUnits.h"
|
||||
#import "RNSVGColorMatrixType.h"
|
||||
#import "RNSVGEdgeMode.h"
|
||||
#import "RNSVGLength.h"
|
||||
#import "RNSVGMaskType.h"
|
||||
#import "RNSVGPathParser.h"
|
||||
#import "RNSVGUnits.h"
|
||||
#import "RNSVGVBMOS.h"
|
||||
|
||||
@class RNSVGBrush;
|
||||
|
||||
@interface RCTConvert (RNSVG)
|
||||
|
||||
+ (RNSVGLength*)RNSVGLength:(id)json;
|
||||
+ (NSArray<RNSVGLength *>*)RNSVGLengthArray:(id)json;
|
||||
+ (RNSVGLength *)RNSVGLength:(id)json;
|
||||
+ (NSArray<RNSVGLength *> *)RNSVGLengthArray:(id)json;
|
||||
+ (RNSVGCGFCRule)RNSVGCGFCRule:(id)json;
|
||||
+ (RNSVGVBMOS)RNSVGVBMOS:(id)json;
|
||||
+ (RNSVGUnits)RNSVGUnits:(id)json;
|
||||
+ (RNSVGMaskType)RNSVGMaskType:(id)json;
|
||||
+ (RNSVGBrush *)RNSVGBrush:(id)json;
|
||||
+ (RNSVGPathParser *)RNSVGCGPath:(NSString *)d;
|
||||
+ (CGRect)RNSVGCGRect:(id)json offset:(NSUInteger)offset;
|
||||
+ (CGColorRef)RNSVGCGColor:(id)json offset:(NSUInteger)offset;
|
||||
+ (RNSVGColor *)RNSVGColor:(id)json offset:(NSUInteger)offset;
|
||||
+ (CGGradientRef)RNSVGCGGradient:(id)json;
|
||||
|
||||
@end
|
||||
|
|
|
@ -4,9 +4,10 @@
|
|||
https://github.com/erica/iOS-Drawing/tree/master/C08/Quartz%20Book%20Pack/Bezier
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "RNSVGUIKit.h"
|
||||
|
||||
#define RNSVGNULLPOINT CGRectNull.origin
|
||||
|
||||
@interface RNSVGBezierElement : NSObject
|
||||
|
@ -18,8 +19,7 @@
|
|||
@property (nonatomic, assign) CGPoint controlPoint2;
|
||||
|
||||
// Instance creation
|
||||
+ (instancetype) elementWithPathElement: (CGPathElement) element;
|
||||
+ (NSArray *) elementsFromCGPath:(CGPathRef)path;
|
||||
+ (instancetype)elementWithPathElement:(CGPathElement)element;
|
||||
+ (NSArray *)elementsFromCGPath:(CGPathRef)path;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
@interface RNSVGBrush : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString* brushRef;
|
||||
@property (nonatomic, strong) NSString *brushRef;
|
||||
|
||||
/* @abstract */
|
||||
- (instancetype)initWithArray:(NSArray *)data;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* This source code is licensed under the MIT-style license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef CF_ENUM(int32_t, RNSVGCGFCRule) {
|
||||
kRNSVGCGFCRuleEvenodd,
|
||||
|
|
|
@ -12,9 +12,8 @@
|
|||
|
||||
@interface RNSVGCircle : RNSVGRenderable
|
||||
|
||||
@property (nonatomic, strong) RNSVGLength* cx;
|
||||
@property (nonatomic, strong) RNSVGLength* cy;
|
||||
@property (nonatomic, strong) RNSVGLength* r;
|
||||
@property (nonatomic, strong) RNSVGLength *cx;
|
||||
@property (nonatomic, strong) RNSVGLength *cy;
|
||||
@property (nonatomic, strong) RNSVGLength *r;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "RNSVGNodeManager.h"
|
||||
#import "RNSVGGroupManager.h"
|
||||
|
||||
@interface RNSVGClipPathManager : RNSVGNodeManager
|
||||
@interface RNSVGClipPathManager : RNSVGGroupManager
|
||||
|
||||
@end
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
typedef CF_ENUM(int32_t, RNSVGColorMatrixType) {
|
||||
SVG_FECOLORMATRIX_TYPE_UNKNOWN,
|
||||
SVG_FECOLORMATRIX_TYPE_MATRIX,
|
||||
SVG_FECOLORMATRIX_TYPE_SATURATE,
|
||||
SVG_FECOLORMATRIX_TYPE_HUEROTATE,
|
||||
SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA
|
||||
};
|
|
@ -0,0 +1,18 @@
|
|||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
#import <react/renderer/components/rnsvg/Props.h>
|
||||
#import "RNSVGColorMatrixType.h"
|
||||
#import "RNSVGEdgeMode.h"
|
||||
#import "RNSVGUnits.h"
|
||||
|
||||
namespace react = facebook::react;
|
||||
|
||||
@interface RNSVGConvert : NSObject
|
||||
|
||||
+ (RNSVGUnits)RNSVGUnitsFromFilterUnitsCppEquivalent:(react::RNSVGFilterFilterUnits)svgUnits;
|
||||
+ (RNSVGUnits)RNSVGUnitsFromPrimitiveUnitsCppEquivalent:(react::RNSVGFilterPrimitiveUnits)svgUnits;
|
||||
+ (RNSVGColorMatrixType)RNSVGColorMatrixTypeFromCppEquivalent:(react::RNSVGFeColorMatrixType)type;
|
||||
+ (RNSVGEdgeMode)RNSVGEdgeModeFromCppEquivalent:(react::RNSVGFeGaussianBlurEdgeMode)edgeMode;
|
||||
|
||||
@end
|
||||
|
||||
#endif // RCT_NEW_ARCH_ENABLED
|
|
@ -9,7 +9,7 @@
|
|||
#import "RNSVGNode.h"
|
||||
|
||||
/**
|
||||
* RNSVG defination are implemented as abstract UIViews for all elements inside Defs.
|
||||
* RNSVG defination are implemented as abstract views for all elements inside Defs.
|
||||
*/
|
||||
|
||||
@interface RNSVGDefs : RNSVGNode
|
||||
|
|
|
@ -6,10 +6,8 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <React/RCTViewManager.h>
|
||||
#import "RNSVGNodeManager.h"
|
||||
|
||||
@interface RNSVGDefsManager : RCTViewManager
|
||||
@interface RNSVGDefsManager : RNSVGNodeManager
|
||||
|
||||
@end
|
||||
|
||||
#import "RNSVGNode.h"
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
typedef CF_ENUM(int32_t, RNSVGEdgeMode) {
|
||||
SVG_EDGEMODE_UNKNOWN,
|
||||
SVG_EDGEMODE_DUPLICATE,
|
||||
SVG_EDGEMODE_WRAP,
|
||||
SVG_EDGEMODE_NONE
|
||||
};
|
|
@ -11,8 +11,8 @@
|
|||
#import "RNSVGPath.h"
|
||||
|
||||
@interface RNSVGEllipse : RNSVGRenderable
|
||||
@property (nonatomic, strong) RNSVGLength* cx;
|
||||
@property (nonatomic, strong) RNSVGLength* cy;
|
||||
@property (nonatomic, strong) RNSVGLength* rx;
|
||||
@property (nonatomic, strong) RNSVGLength* ry;
|
||||
@property (nonatomic, strong) RNSVGLength *cx;
|
||||
@property (nonatomic, strong) RNSVGLength *cy;
|
||||
@property (nonatomic, strong) RNSVGLength *rx;
|
||||
@property (nonatomic, strong) RNSVGLength *ry;
|
||||
@end
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#import "RNSVGColorMatrixType.h"
|
||||
#import "RNSVGFilterPrimitive.h"
|
||||
|
||||
@interface RNSVGFeColorMatrix : RNSVGFilterPrimitive
|
||||
|
||||
@property (nonatomic, strong) NSString *in1;
|
||||
@property (nonatomic, assign) RNSVGColorMatrixType type;
|
||||
@property (nonatomic, strong) NSArray<NSNumber *> *values;
|
||||
|
||||
@end
|
|
@ -0,0 +1,5 @@
|
|||
#import "RNSVGFilterPrimitiveManager.h"
|
||||
|
||||
@interface RNSVGFeColorMatrixManager : RNSVGFilterPrimitiveManager
|
||||
|
||||
@end
|
|
@ -0,0 +1,11 @@
|
|||
#import "RNSVGEdgeMode.h"
|
||||
#import "RNSVGFilterPrimitive.h"
|
||||
|
||||
@interface RNSVGFeGaussianBlur : RNSVGFilterPrimitive
|
||||
|
||||
@property (nonatomic, strong) NSString *in1;
|
||||
@property (nonatomic, strong) NSNumber *stdDeviationX;
|
||||
@property (nonatomic, strong) NSNumber *stdDeviationY;
|
||||
@property (nonatomic, assign) RNSVGEdgeMode edgeMode;
|
||||
|
||||
@end
|
|
@ -0,0 +1,5 @@
|
|||
#import "RNSVGFilterPrimitiveManager.h"
|
||||
|
||||
@interface RNSVGFeGaussianBlurManager : RNSVGFilterPrimitiveManager
|
||||
|
||||
@end
|
|
@ -0,0 +1,7 @@
|
|||
#import "RNSVGFilterPrimitive.h"
|
||||
|
||||
@interface RNSVGFeMerge : RNSVGFilterPrimitive
|
||||
|
||||
@property (nonatomic, copy) NSArray<NSString *> *nodes;
|
||||
|
||||
@end
|
|
@ -0,0 +1,5 @@
|
|||
#import "RNSVGFilterPrimitiveManager.h"
|
||||
|
||||
@interface RNSVGFeMergeManager : RNSVGFilterPrimitiveManager
|
||||
|
||||
@end
|
|
@ -0,0 +1,9 @@
|
|||
#import "RNSVGFilterPrimitive.h"
|
||||
|
||||
@interface RNSVGFeOffset : RNSVGFilterPrimitive
|
||||
|
||||
@property (nonatomic, strong) NSString *in1;
|
||||
@property (nonatomic, strong) RNSVGLength *dx;
|
||||
@property (nonatomic, strong) RNSVGLength *dy;
|
||||
|
||||
@end
|
|
@ -0,0 +1,5 @@
|
|||
#import "RNSVGFilterPrimitiveManager.h"
|
||||
|
||||
@interface RNSVGFeOffsetManager : RNSVGFilterPrimitiveManager
|
||||
|
||||
@end
|
|
@ -0,0 +1,22 @@
|
|||
#import "RNSVGFilterRegion.h"
|
||||
#import "RNSVGNode.h"
|
||||
|
||||
@interface RNSVGFilter : RNSVGNode
|
||||
|
||||
@property (nonatomic, strong) RNSVGLength *x;
|
||||
@property (nonatomic, strong) RNSVGLength *y;
|
||||
@property (nonatomic, strong) RNSVGLength *width;
|
||||
@property (nonatomic, strong) RNSVGLength *height;
|
||||
@property (nonatomic, assign) RNSVGUnits filterUnits;
|
||||
@property (nonatomic, assign) RNSVGUnits primitiveUnits;
|
||||
|
||||
- (CIImage *)applyFilter:(CIImage *)img
|
||||
backgroundImg:(CIImage *)backgroundImg
|
||||
renderableBounds:(CGRect)renderableBounds
|
||||
canvasBounds:(CGRect)canvasBounds
|
||||
ctm:(CGAffineTransform)ctm;
|
||||
- (CGContext *)openContext:(CGSize)size;
|
||||
- (void)endContext:(CGContext *)context;
|
||||
- (CIImage *)getMaskFromRect:(CGContext *)context rect:(CGRect)rect ctm:(CGAffineTransform)ctm;
|
||||
|
||||
@end
|
|
@ -0,0 +1,5 @@
|
|||
#import "RNSVGNodeManager.h"
|
||||
|
||||
@interface RNSVGFilterManager : RNSVGNodeManager
|
||||
|
||||
@end
|
|
@ -0,0 +1,17 @@
|
|||
#import "RNSVGFilterRegion.h"
|
||||
#import "RNSVGNode.h"
|
||||
|
||||
@interface RNSVGFilterPrimitive : RNSVGNode
|
||||
|
||||
@property (nonatomic, strong) RNSVGLength *x;
|
||||
@property (nonatomic, strong) RNSVGLength *y;
|
||||
@property (nonatomic, strong) RNSVGLength *width;
|
||||
@property (nonatomic, strong) RNSVGLength *height;
|
||||
@property (nonatomic, strong) NSString *result;
|
||||
|
||||
- (CIImage *)applyFilter:(NSMutableDictionary<NSString *, CIImage *> *)results previousFilterResult:(CIImage *)previous;
|
||||
- (CIImage *)applyFilter:(NSMutableDictionary<NSString *, CIImage *> *)results
|
||||
previousFilterResult:(CIImage *)previous
|
||||
ctm:(CGAffineTransform)ctm;
|
||||
|
||||
@end
|
|
@ -0,0 +1,5 @@
|
|||
#import "RNSVGNodeManager.h"
|
||||
|
||||
@interface RNSVGFilterPrimitiveManager : RNSVGNodeManager
|
||||
|
||||
@end
|
|
@ -0,0 +1,19 @@
|
|||
#import "RNSVGNode.h"
|
||||
#import "RNSVGUnits.h"
|
||||
|
||||
#ifndef RNSVGFilterRegion_h
|
||||
#define RNSVGFilterRegion_h
|
||||
|
||||
@interface RNSVGFilterRegion : NSObject
|
||||
|
||||
@property (nonatomic, strong) RNSVGLength *x;
|
||||
@property (nonatomic, strong) RNSVGLength *y;
|
||||
@property (nonatomic, strong) RNSVGLength *width;
|
||||
@property (nonatomic, strong) RNSVGLength *height;
|
||||
|
||||
+ (instancetype)regionWithX:(RNSVGLength *)x y:(RNSVGLength *)y width:(RNSVGLength *)width height:(RNSVGLength *)height;
|
||||
- (CGRect)getCropRect:(RNSVGNode *)node units:(RNSVGUnits)units renderableBounds:(CGRect)renderableBounds;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* RNSVGFilterRegion_h */
|
|
@ -1,16 +1,17 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "RNSVGTextProperties.h"
|
||||
#import "RNSVGUIKit.h"
|
||||
|
||||
#import "RNSVGPropHelper.h"
|
||||
#import "RNSVGTextProperties.h"
|
||||
|
||||
@interface RNSVGFontData : NSObject {
|
||||
@public
|
||||
@public
|
||||
CGFloat fontSize;
|
||||
NSString * fontSize_;
|
||||
NSString *fontSize_;
|
||||
NSString *fontFamily;
|
||||
enum RNSVGFontStyle fontStyle;
|
||||
NSDictionary * fontData;
|
||||
NSDictionary *fontData;
|
||||
enum RNSVGFontWeight fontWeight;
|
||||
int absoluteFontWeight;
|
||||
NSString *fontFeatureSettings;
|
||||
|
@ -25,11 +26,9 @@
|
|||
|
||||
+ (instancetype)Defaults;
|
||||
|
||||
+ (CGFloat)toAbsoluteWithNSString:(NSString *)string
|
||||
fontSize:(CGFloat)fontSize;
|
||||
+ (CGFloat)toAbsoluteWithNSString:(NSString *)string fontSize:(CGFloat)fontSize;
|
||||
|
||||
+ (instancetype)initWithNSDictionary:(NSDictionary *)font
|
||||
parent:(RNSVGFontData *)parent;
|
||||
+ (instancetype)initWithNSDictionary:(NSDictionary *)font parent:(RNSVGFontData *)parent;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#import <React/UIView+React.h>
|
||||
#import <CoreText/CoreText.h>
|
||||
#import <React/UIView+React.h>
|
||||
#import "RNSVGFontData.h"
|
||||
|
||||
@class RNSVGText;
|
||||
|
@ -10,8 +10,7 @@
|
|||
|
||||
- (CTFontRef)getGlyphFont;
|
||||
|
||||
- (instancetype)initWithWidth:(CGFloat)width
|
||||
height:(CGFloat)height;
|
||||
- (instancetype)initWithWidth:(CGFloat)width height:(CGFloat)height;
|
||||
|
||||
- (RNSVGFontData *)getFont;
|
||||
|
||||
|
@ -33,17 +32,16 @@
|
|||
|
||||
- (void)popContext;
|
||||
|
||||
- (void)pushContext:(RNSVGText*)node
|
||||
font:(NSDictionary*)font
|
||||
x:(NSArray<RNSVGLength*>*)x
|
||||
y:(NSArray<RNSVGLength*>*)y
|
||||
deltaX:(NSArray<RNSVGLength*>*)deltaX
|
||||
deltaY:(NSArray<RNSVGLength*>*)deltaY
|
||||
rotate:(NSArray<RNSVGLength*>*)rotate;
|
||||
- (void)pushContext:(RNSVGText *)node
|
||||
font:(NSDictionary *)font
|
||||
x:(NSArray<RNSVGLength *> *)x
|
||||
y:(NSArray<RNSVGLength *> *)y
|
||||
deltaX:(NSArray<RNSVGLength *> *)deltaX
|
||||
deltaY:(NSArray<RNSVGLength *> *)deltaY
|
||||
rotate:(NSArray<RNSVGLength *> *)rotate;
|
||||
|
||||
- (void)pushContext:(RNSVGGroup*)node
|
||||
font:(NSDictionary *)font;
|
||||
- (void)pushContext:(RNSVGGroup *)node font:(NSDictionary *)font;
|
||||
|
||||
- (NSArray*)getFontContext;
|
||||
- (NSArray *)getFontContext;
|
||||
|
||||
@end
|
||||
|
|
|
@ -7,12 +7,14 @@
|
|||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RNSVGContainer.h"
|
||||
|
||||
#import "RNSVGUIKit.h"
|
||||
|
||||
#import "RNSVGCGFCRule.h"
|
||||
#import "RNSVGSvgView.h"
|
||||
#import "RNSVGPath.h"
|
||||
#import "RNSVGContainer.h"
|
||||
#import "RNSVGGlyphContext.h"
|
||||
#import "RNSVGPath.h"
|
||||
#import "RNSVGSvgView.h"
|
||||
|
||||
@interface RNSVGGroup : RNSVGPath <RNSVGContainer>
|
||||
|
||||
|
|
|
@ -9,19 +9,29 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <React/RCTBridge.h>
|
||||
#import "RNSVGLength.h"
|
||||
#import "RNSVGRenderable.h"
|
||||
#import "RNSVGVBMOS.h"
|
||||
#import "RNSVGLength.h"
|
||||
|
||||
#import <React/RCTImageSource.h>
|
||||
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
#import <React/RCTImageResponseDelegate.h>
|
||||
#endif
|
||||
|
||||
@interface RNSVGImage : RNSVGRenderable
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
<RCTImageResponseDelegate>
|
||||
#endif
|
||||
|
||||
@property (nonatomic, weak) RCTBridge *bridge;
|
||||
@property (nonatomic, assign) id src;
|
||||
@property (nonatomic, strong) RNSVGLength* x;
|
||||
@property (nonatomic, strong) RNSVGLength* y;
|
||||
@property (nonatomic, strong) RNSVGLength* imagewidth;
|
||||
@property (nonatomic, strong) RNSVGLength* imageheight;
|
||||
@property (nonatomic, assign) RCTImageSource *src;
|
||||
@property (nonatomic, strong) RNSVGLength *x;
|
||||
@property (nonatomic, strong) RNSVGLength *y;
|
||||
@property (nonatomic, strong) RNSVGLength *imagewidth;
|
||||
@property (nonatomic, strong) RNSVGLength *imageheight;
|
||||
@property (nonatomic, strong) NSString *align;
|
||||
@property (nonatomic, assign) RNSVGVBMOS meetOrSlice;
|
||||
@property (nonatomic, copy) RCTDirectEventBlock onLoad;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
#import "RNSVGUIKit.h"
|
||||
|
||||
#ifndef RNSVGLength_h
|
||||
#define RNSVGLength_h
|
||||
|
@ -23,9 +23,9 @@ typedef CF_ENUM(unsigned short, RNSVGLengthUnitType) {
|
|||
@property (nonatomic, assign) CGFloat value;
|
||||
@property (nonatomic, assign) RNSVGLengthUnitType unit;
|
||||
|
||||
+ (instancetype) lengthWithNumber: (CGFloat) number;
|
||||
+ (instancetype) lengthWithString: (NSString *) lengthString;
|
||||
- (BOOL) isEqualTo: (RNSVGLength *)other;
|
||||
+ (instancetype)lengthWithNumber:(CGFloat)number;
|
||||
+ (instancetype)lengthWithString:(NSString *)lengthString;
|
||||
- (BOOL)isEqualTo:(RNSVGLength *)other;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
#import "RNSVGPath.h"
|
||||
|
||||
@interface RNSVGLine : RNSVGRenderable
|
||||
@property (nonatomic, strong) RNSVGLength* x1;
|
||||
@property (nonatomic, strong) RNSVGLength* y1;
|
||||
@property (nonatomic, strong) RNSVGLength* x2;
|
||||
@property (nonatomic, strong) RNSVGLength* y2;
|
||||
@property (nonatomic, strong) RNSVGLength *x1;
|
||||
@property (nonatomic, strong) RNSVGLength *y1;
|
||||
@property (nonatomic, strong) RNSVGLength *x2;
|
||||
@property (nonatomic, strong) RNSVGLength *y2;
|
||||
@end
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "RNSVGNode.h"
|
||||
#import "RNSVGLength.h"
|
||||
#import "RNSVGNode.h"
|
||||
|
||||
@interface RNSVGLinearGradient : RNSVGNode
|
||||
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
@property (nonatomic, strong) NSString *align;
|
||||
@property (nonatomic, assign) RNSVGVBMOS meetOrSlice;
|
||||
|
||||
- (void)renderMarker:(CGContextRef)context rect:(CGRect)rect position:(RNSVGMarkerPosition*)position strokeWidth:(CGFloat)strokeWidth;
|
||||
- (void)renderMarker:(CGContextRef)context
|
||||
rect:(CGRect)rect
|
||||
position:(RNSVGMarkerPosition *)position
|
||||
strokeWidth:(CGFloat)strokeWidth;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef enum RNSVGMarkerType {
|
||||
kStartMarker,
|
||||
kMidMarker,
|
||||
kEndMarker
|
||||
} RNSVGMarkerType;
|
||||
#import "RNSVGUIKit.h"
|
||||
|
||||
typedef enum RNSVGMarkerType { kStartMarker, kMidMarker, kEndMarker } RNSVGMarkerType;
|
||||
|
||||
#define RNSVGZEROPOINT CGRectZero.origin
|
||||
|
||||
|
@ -18,8 +14,8 @@ typedef enum RNSVGMarkerType {
|
|||
@property (nonatomic, assign) float angle;
|
||||
|
||||
// Instance creation
|
||||
+ (instancetype) markerPosition:(RNSVGMarkerType)type origin:(CGPoint)origin angle:(float)angle;
|
||||
+ (instancetype)markerPosition:(RNSVGMarkerType)type origin:(CGPoint)origin angle:(float)angle;
|
||||
|
||||
+ (NSArray<RNSVGMarkerPosition*>*) fromCGPath:(CGPathRef)path;
|
||||
+ (NSArray<RNSVGMarkerPosition *> *)fromCGPath:(CGPathRef)path;
|
||||
|
||||
@end
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
@property (nonatomic, strong) RNSVGLength *maskheight;
|
||||
@property (nonatomic, assign) RNSVGUnits maskUnits;
|
||||
@property (nonatomic, assign) RNSVGUnits maskContentUnits;
|
||||
@property (nonatomic, assign) CGAffineTransform maskTransform;
|
||||
@property (nonatomic, assign) RNSVGMaskType maskType;
|
||||
|
||||
@end
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
typedef CF_ENUM(int32_t, RNSVGMaskType) {
|
||||
kRNSVGMaskTypeLuminance,
|
||||
kRNSVGMaskTypeAlpha
|
||||
};
|
|
@ -6,19 +6,20 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <React/UIView+React.h>
|
||||
#import <React/RCTPointerEvents.h>
|
||||
#import "RNSVGCGFCRule.h"
|
||||
#import "RNSVGSvgView.h"
|
||||
|
||||
#import <React/RCTPointerEvents.h>
|
||||
#import <React/UIView+React.h>
|
||||
|
||||
@class RNSVGGroup;
|
||||
|
||||
/**
|
||||
* RNSVG nodes are implemented as base UIViews. They should be implementation for all basic
|
||||
* RNSVG nodes are implemented as base NSViews/UIViews. They should be implementation for all basic
|
||||
*interfaces for all non-definition nodes.
|
||||
*/
|
||||
|
||||
@interface RNSVGNode : UIView
|
||||
|
||||
@interface RNSVGNode : RNSVGView
|
||||
/*
|
||||
N[1/Sqrt[2], 36]
|
||||
The inverse of the square root of 2.
|
||||
|
@ -36,6 +37,7 @@ extern CGFloat const RNSVG_DEFAULT_FONT_SIZE;
|
|||
@property (nonatomic, strong) NSString *markerStart;
|
||||
@property (nonatomic, strong) NSString *markerMid;
|
||||
@property (nonatomic, strong) NSString *markerEnd;
|
||||
@property (nonatomic, strong) RNSVGPlatformView *parentComponentView;
|
||||
|
||||
/**
|
||||
* Used to control how touch events are processed.
|
||||
|
@ -63,7 +65,6 @@ extern CGFloat const RNSVG_DEFAULT_FONT_SIZE;
|
|||
@property (nonatomic, assign) CGRect markerBounds;
|
||||
@property (nonatomic, copy) RCTDirectEventBlock onLayout;
|
||||
|
||||
|
||||
/**
|
||||
* RNSVGSvgView which ownes current RNSVGNode
|
||||
*/
|
||||
|
@ -101,7 +102,7 @@ extern CGFloat const RNSVG_DEFAULT_FONT_SIZE;
|
|||
/**
|
||||
* getPath will return the path inside node as a ClipPath.
|
||||
*/
|
||||
- (CGPathRef)getPath:(CGContextRef) context;
|
||||
- (CGPathRef)getPath:(CGContextRef)context;
|
||||
|
||||
- (CGFloat)relativeOnWidthString:(NSString *)length;
|
||||
|
||||
|
@ -111,6 +112,8 @@ extern CGFloat const RNSVG_DEFAULT_FONT_SIZE;
|
|||
|
||||
- (CGFloat)relativeOn:(RNSVGLength *)length relative:(CGFloat)relative;
|
||||
|
||||
- (CGFloat)relativeOnFraction:(RNSVGLength *)length relative:(CGFloat)relative;
|
||||
|
||||
- (CGFloat)relativeOnWidth:(RNSVGLength *)length;
|
||||
|
||||
- (CGFloat)relativeOnHeight:(RNSVGLength *)length;
|
||||
|
@ -132,7 +135,7 @@ extern CGFloat const RNSVG_DEFAULT_FONT_SIZE;
|
|||
|
||||
- (void)endTransparencyLayer:(CGContextRef)context;
|
||||
|
||||
- (void)traverseSubviews:(BOOL (^)(__kindof UIView *node))block;
|
||||
- (void)traverseSubviews:(BOOL (^)(__kindof RNSVGView *node))block;
|
||||
|
||||
- (void)clearChildCache;
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "RNSVGNode.h"
|
||||
#import <React/RCTViewManager.h>
|
||||
#import "RNSVGNode.h"
|
||||
|
||||
@interface RNSVGNodeManager : RCTViewManager
|
||||
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
#import "RCTConvert+RNSVG.h"
|
||||
#import "RNSVGBrushType.h"
|
||||
#import "RNSVGUnits.h"
|
||||
#import "RNSVGLength.h"
|
||||
#import "RNSVGUnits.h"
|
||||
|
||||
@class RNSVGPattern;
|
||||
|
||||
@interface RNSVGPainter : NSObject
|
||||
|
||||
@property (nonatomic, assign) RNSVGPattern* pattern;
|
||||
@property (nonatomic, assign) RNSVGPattern *pattern;
|
||||
@property (nonatomic, assign) CGRect paintBounds;
|
||||
@property (nonatomic, assign) bool useObjectBoundingBoxForContentUnits;
|
||||
@property (nonatomic, assign) CGRect bounds;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RNSVGUIKit.h"
|
||||
|
||||
@interface RNSVGPathMeasure : NSObject
|
||||
|
||||
|
|
|
@ -6,12 +6,11 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RNSVGUIKit.h"
|
||||
|
||||
@interface RNSVGPathParser : NSObject
|
||||
|
||||
- (instancetype) initWithPathString:(NSString *)d;
|
||||
- (instancetype)initWithPathString:(NSString *)d;
|
||||
- (CGPathRef)getPath;
|
||||
|
||||
@end
|
||||
|
|
|
@ -7,16 +7,11 @@
|
|||
|
||||
@interface RNSVGPropHelper : NSObject
|
||||
|
||||
+ (CGFloat) fromRelativeWithNSString:(NSString *)length
|
||||
relative:(CGFloat)relative
|
||||
fontSize:(CGFloat)fontSize;
|
||||
+ (CGFloat)fromRelativeWithNSString:(NSString *)length relative:(CGFloat)relative fontSize:(CGFloat)fontSize;
|
||||
|
||||
+ (CGFloat) fromRelative:(RNSVGLength*)length
|
||||
relative:(CGFloat)relative
|
||||
fontSize:(CGFloat)fontSize;
|
||||
+ (CGFloat)fromRelative:(RNSVGLength *)length relative:(CGFloat)relative fontSize:(CGFloat)fontSize;
|
||||
|
||||
+ (CGFloat)fromRelative:(RNSVGLength*)length
|
||||
relative:(CGFloat)relative;
|
||||
+ (CGFloat)fromRelative:(RNSVGLength *)length relative:(CGFloat)relative;
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "RNSVGNode.h"
|
||||
#import "RNSVGLength.h"
|
||||
#import "RNSVGNode.h"
|
||||
|
||||
@interface RNSVGRadialGradient : RNSVGNode
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
|
||||
@interface RNSVGRect : RNSVGRenderable
|
||||
|
||||
@property (nonatomic, strong) RNSVGLength* x;
|
||||
@property (nonatomic, strong) RNSVGLength* y;
|
||||
@property (nonatomic, strong) RNSVGLength* rectwidth;
|
||||
@property (nonatomic, strong) RNSVGLength* rectheight;
|
||||
@property (nonatomic, strong) RNSVGLength* rx;
|
||||
@property (nonatomic, strong) RNSVGLength* ry;
|
||||
@property (nonatomic, strong) RNSVGLength *x;
|
||||
@property (nonatomic, strong) RNSVGLength *y;
|
||||
@property (nonatomic, strong) RNSVGLength *rectwidth;
|
||||
@property (nonatomic, strong) RNSVGLength *rectheight;
|
||||
@property (nonatomic, strong) RNSVGLength *rx;
|
||||
@property (nonatomic, strong) RNSVGLength *ry;
|
||||
|
||||
@end
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#import "RNSVGRenderable.h"
|
||||
|
||||
@interface RNSVGRenderUtils : NSObject
|
||||
|
||||
+ (CIContext *)sharedCIContext;
|
||||
+ (CGFloat)getScreenScale;
|
||||
+ (CGImage *)renderToImage:(RNSVGRenderable *)renderable
|
||||
ctm:(CGAffineTransform)ctm
|
||||
rect:(CGRect)rect
|
||||
clip:(CGRect *)clip;
|
||||
|
||||
@end
|
|
@ -8,10 +8,12 @@
|
|||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "RNSVGUIKit.h"
|
||||
|
||||
#import "RNSVGBrush.h"
|
||||
#import "RNSVGCGFCRule.h"
|
||||
#import "RNSVGNode.h"
|
||||
#import "RNSVGLength.h"
|
||||
#import "RNSVGNode.h"
|
||||
#import "RNSVGVectorEffect.h"
|
||||
|
||||
@interface RNSVGRenderable : RNSVGNode
|
||||
|
@ -31,6 +33,7 @@
|
|||
@property (nonatomic, assign) RNSVGVectorEffect vectorEffect;
|
||||
@property (nonatomic, copy) NSArray<NSString *> *propList;
|
||||
@property (nonatomic, assign) CGPathRef hitArea;
|
||||
@property (nonatomic, strong) NSString *filter;
|
||||
|
||||
- (void)setHitArea:(CGPathRef)path;
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* Copyright (c) 2015-present, Horcrux.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT-style license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
#import <rnsvg/rnsvg.h>
|
||||
#else
|
||||
#import <React/RCTBridge.h>
|
||||
#endif
|
||||
|
||||
@interface RNSVGRenderableModule : NSObject
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
<NativeSvgRenderableModuleSpec>
|
||||
#else
|
||||
<RCTBridgeModule>
|
||||
#endif
|
||||
@end
|
|
@ -11,5 +11,6 @@
|
|||
@interface RNSVGSolidColorBrush : RNSVGBrush
|
||||
|
||||
- (instancetype)initWithNumber:(NSNumber *)number;
|
||||
- (instancetype)initWithColor:(RNSVGColor *)color;
|
||||
|
||||
@end
|
||||
|
|
|
@ -6,14 +6,18 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RNSVGPainter.h"
|
||||
#import "RNSVGUIKit.h"
|
||||
|
||||
#import "RNSVGContainer.h"
|
||||
#import "RNSVGPainter.h"
|
||||
#import "RNSVGVBMOS.h"
|
||||
|
||||
@class RNSVGNode;
|
||||
@class RNSVGMarker;
|
||||
@class RNSVGMask;
|
||||
@class RNSVGFilter;
|
||||
|
||||
@interface RNSVGSvgView : UIView <RNSVGContainer>
|
||||
@interface RNSVGSvgView : RNSVGView <RNSVGContainer>
|
||||
|
||||
@property (nonatomic, strong) RNSVGLength *bbWidth;
|
||||
@property (nonatomic, strong) RNSVGLength *bbHeight;
|
||||
|
@ -29,8 +33,7 @@
|
|||
@property (nonatomic, assign) CGAffineTransform initialCTM;
|
||||
@property (nonatomic, assign) CGAffineTransform invInitialCTM;
|
||||
@property (nonatomic, assign) CGAffineTransform viewBoxTransform;
|
||||
|
||||
|
||||
@property (nonatomic, assign) UIEdgeInsets hitTestEdgeInsets;
|
||||
|
||||
/**
|
||||
* define <ClipPath></ClipPath> content as clipPath template.
|
||||
|
@ -39,7 +42,7 @@
|
|||
|
||||
- (RNSVGNode *)getDefinedClipPath:(NSString *)clipPathName;
|
||||
|
||||
- (void)defineTemplate:(__kindof RNSVGNode *)template templateName:(NSString *)templateName;
|
||||
- (void)defineTemplate:(__kindof RNSVGNode *)definedTemplate templateName:(NSString *)templateName;
|
||||
|
||||
- (RNSVGNode *)getDefinedTemplate:(NSString *)templateName;
|
||||
|
||||
|
@ -47,17 +50,19 @@
|
|||
|
||||
- (RNSVGPainter *)getDefinedPainter:(NSString *)painterName;
|
||||
|
||||
- (void)defineMarker:(RNSVGNode *)marker markerName:(NSString *)markerName;
|
||||
- (void)defineMarker:(RNSVGMarker *)marker markerName:(NSString *)markerName;
|
||||
|
||||
- (RNSVGNode *)getDefinedMarker:(NSString *)markerName;
|
||||
- (RNSVGMarker *)getDefinedMarker:(NSString *)markerName;
|
||||
|
||||
- (void)defineMask:(RNSVGNode *)mask maskName:(NSString *)maskName;
|
||||
- (void)defineMask:(RNSVGMask *)mask maskName:(NSString *)maskName;
|
||||
|
||||
- (RNSVGNode *)getDefinedMask:(NSString *)maskName;
|
||||
- (RNSVGMask *)getDefinedMask:(NSString *)maskName;
|
||||
|
||||
- (NSString *)getDataURL;
|
||||
- (void)defineFilter:(RNSVGFilter *)filter filterName:(NSString *)filterName;
|
||||
|
||||
- (NSString *)getDataURLwithBounds:(CGRect)bounds;
|
||||
- (RNSVGFilter *)getDefinedFilter:(NSString *)filterName;
|
||||
|
||||
- (NSString *)getDataURLWithBounds:(CGRect)bounds;
|
||||
|
||||
- (CGRect)getContextBounds;
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* Copyright (c) 2015-present, Horcrux.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT-style license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
#import <rnsvg/rnsvg.h>
|
||||
#else
|
||||
#import <React/RCTBridge.h>
|
||||
#endif
|
||||
|
||||
@interface RNSVGSvgViewModule : NSObject
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
<NativeSvgViewModuleSpec>
|
||||
#else
|
||||
<RCTBridgeModule>
|
||||
#endif
|
||||
@end
|
|
@ -6,8 +6,8 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "RNSVGNodeManager.h"
|
||||
#import "RNSVGGroupManager.h"
|
||||
|
||||
@interface RNSVGSymbolManager : RNSVGNodeManager
|
||||
@interface RNSVGSymbolManager : RNSVGGroupManager
|
||||
|
||||
@end
|
||||
|
|
|
@ -5,9 +5,12 @@
|
|||
* This source code is licensed under the MIT-style license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <CoreText/CoreText.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "RNSVGUIKit.h"
|
||||
|
||||
#import "RNSVGText.h"
|
||||
|
||||
@interface RNSVGTSpan : RNSVGText
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
- (CGPathRef)getGroupPath:(CGContextRef)context;
|
||||
- (CTFontRef)getFontFromContext;
|
||||
- (CGFloat)getSubtreeTextChunksTotalAdvance;
|
||||
- (RNSVGText*)getTextAnchorRoot;
|
||||
- (RNSVGText *)getTextAnchorRoot;
|
||||
|
||||
@end
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreText/CoreText.h>
|
||||
#import "RNSVGText.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RNSVGLength.h"
|
||||
#import "RNSVGText.h"
|
||||
|
||||
@interface RNSVGTextPath : RNSVGText
|
||||
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
|
||||
#import "RNSVGTextManager.h"
|
||||
|
||||
@interface RNSVGTextPathManager : RNSVGRenderableManager
|
||||
@interface RNSVGTextPathManager : RNSVGTextManager
|
||||
|
||||
@end
|
||||
|
|
|
@ -30,35 +30,15 @@ typedef NS_ENUM(NSInteger, RNSVGAlignmentBaseline) {
|
|||
RNSVGAlignmentBaselineDEFAULT = RNSVGAlignmentBaselineBaseline
|
||||
};
|
||||
|
||||
static NSString* const RNSVGAlignmentBaselineStrings[] = {
|
||||
@"baseline",
|
||||
@"text-bottom",
|
||||
@"alphabetic",
|
||||
@"ideographic",
|
||||
@"middle",
|
||||
@"central",
|
||||
@"mathematical",
|
||||
@"text-top",
|
||||
@"bottom",
|
||||
@"center",
|
||||
@"top",
|
||||
@"text-before-edge",
|
||||
@"text-after-edge",
|
||||
@"before-edge",
|
||||
@"after-edge",
|
||||
@"hanging",
|
||||
@"central",
|
||||
@"mathematical",
|
||||
@"text-top",
|
||||
@"bottom",
|
||||
@"center",
|
||||
@"top",
|
||||
nil
|
||||
};
|
||||
static NSString *const RNSVGAlignmentBaselineStrings[] = {
|
||||
@"baseline", @"text-bottom", @"alphabetic", @"ideographic", @"middle", @"central",
|
||||
@"mathematical", @"text-top", @"bottom", @"center", @"top", @"text-before-edge",
|
||||
@"text-after-edge", @"before-edge", @"after-edge", @"hanging", @"central", @"mathematical",
|
||||
@"text-top", @"bottom", @"center", @"top", nil};
|
||||
|
||||
NSString* RNSVGAlignmentBaselineToString( enum RNSVGAlignmentBaseline fw );
|
||||
NSString *RNSVGAlignmentBaselineToString(enum RNSVGAlignmentBaseline fw);
|
||||
|
||||
enum RNSVGAlignmentBaseline RNSVGAlignmentBaselineFromString( NSString* s );
|
||||
enum RNSVGAlignmentBaseline RNSVGAlignmentBaselineFromString(NSString *s);
|
||||
|
||||
typedef NS_ENUM(NSInteger, RNSVGFontStyle) {
|
||||
RNSVGFontStyleNormal,
|
||||
|
@ -67,11 +47,11 @@ typedef NS_ENUM(NSInteger, RNSVGFontStyle) {
|
|||
RNSVGFontStyleDEFAULT = RNSVGFontStyleNormal,
|
||||
};
|
||||
|
||||
static NSString* const RNSVGFontStyleStrings[] = {@"normal", @"italic", @"oblique", nil};
|
||||
static NSString *const RNSVGFontStyleStrings[] = {@"normal", @"italic", @"oblique", nil};
|
||||
|
||||
NSString* RNSVGFontStyleToString( enum RNSVGFontStyle fw );
|
||||
NSString *RNSVGFontStyleToString(enum RNSVGFontStyle fw);
|
||||
|
||||
enum RNSVGFontStyle RNSVGFontStyleFromString( NSString* s );
|
||||
enum RNSVGFontStyle RNSVGFontStyleFromString(NSString *s);
|
||||
|
||||
typedef NS_ENUM(NSInteger, RNSVGFontVariantLigatures) {
|
||||
RNSVGFontVariantLigaturesNormal,
|
||||
|
@ -79,11 +59,11 @@ typedef NS_ENUM(NSInteger, RNSVGFontVariantLigatures) {
|
|||
RNSVGFontVariantLigaturesDEFAULT = RNSVGFontVariantLigaturesNormal,
|
||||
};
|
||||
|
||||
static NSString* const RNSVGFontVariantLigaturesStrings[] = {@"normal", @"none", nil};
|
||||
static NSString *const RNSVGFontVariantLigaturesStrings[] = {@"normal", @"none", nil};
|
||||
|
||||
NSString* RNSVGFontVariantLigaturesToString( enum RNSVGFontVariantLigatures fw );
|
||||
NSString *RNSVGFontVariantLigaturesToString(enum RNSVGFontVariantLigatures fw);
|
||||
|
||||
enum RNSVGFontVariantLigatures RNSVGFontVariantLigaturesFromString( NSString* s );
|
||||
enum RNSVGFontVariantLigatures RNSVGFontVariantLigaturesFromString(NSString *s);
|
||||
|
||||
typedef NS_ENUM(NSInteger, RNSVGFontWeight) {
|
||||
// Absolute
|
||||
|
@ -104,7 +84,21 @@ typedef NS_ENUM(NSInteger, RNSVGFontWeight) {
|
|||
RNSVGFontWeightDEFAULT = RNSVGFontWeightNormal,
|
||||
};
|
||||
|
||||
static NSString* const RNSVGFontWeightStrings[] = {@"normal", @"bold", @"100", @"200", @"300", @"400", @"500", @"600", @"700", @"800", @"900", @"bolder", @"lighter", nil};
|
||||
static NSString *const RNSVGFontWeightStrings[] = {
|
||||
@"normal",
|
||||
@"bold",
|
||||
@"100",
|
||||
@"200",
|
||||
@"300",
|
||||
@"400",
|
||||
@"500",
|
||||
@"600",
|
||||
@"700",
|
||||
@"800",
|
||||
@"900",
|
||||
@"bolder",
|
||||
@"lighter",
|
||||
nil};
|
||||
|
||||
static int const RNSVGAbsoluteFontWeights[] = {400, 700, 100, 200, 300, 400, 500, 600, 700, 800, 900};
|
||||
|
||||
|
@ -119,12 +113,11 @@ static RNSVGFontWeight const RNSVGFontWeights[] = {
|
|||
RNSVGFontWeightBold,
|
||||
RNSVGFontWeight800,
|
||||
RNSVGFontWeight900,
|
||||
RNSVGFontWeight900
|
||||
};
|
||||
RNSVGFontWeight900};
|
||||
|
||||
NSString* RNSVGFontWeightToString( enum RNSVGFontWeight fw );
|
||||
NSString *RNSVGFontWeightToString(enum RNSVGFontWeight fw);
|
||||
|
||||
enum RNSVGFontWeight RNSVGFontWeightFromString( NSString* s );
|
||||
NSInteger RNSVGFontWeightFromString(NSString *s);
|
||||
|
||||
typedef NS_ENUM(NSInteger, RNSVGTextAnchor) {
|
||||
RNSVGTextAnchorStart,
|
||||
|
@ -133,11 +126,11 @@ typedef NS_ENUM(NSInteger, RNSVGTextAnchor) {
|
|||
RNSVGTextAnchorDEFAULT = RNSVGTextAnchorStart,
|
||||
};
|
||||
|
||||
static NSString* const RNSVGTextAnchorStrings[] = {@"start", @"middle", @"end", nil};
|
||||
static NSString *const RNSVGTextAnchorStrings[] = {@"start", @"middle", @"end", nil};
|
||||
|
||||
NSString* RNSVGTextAnchorToString( enum RNSVGTextAnchor fw );
|
||||
NSString *RNSVGTextAnchorToString(enum RNSVGTextAnchor fw);
|
||||
|
||||
enum RNSVGTextAnchor RNSVGTextAnchorFromString( NSString* s );
|
||||
enum RNSVGTextAnchor RNSVGTextAnchorFromString(NSString *s);
|
||||
|
||||
typedef NS_ENUM(NSInteger, RNSVGTextDecoration) {
|
||||
RNSVGTextDecorationNone,
|
||||
|
@ -148,11 +141,12 @@ typedef NS_ENUM(NSInteger, RNSVGTextDecoration) {
|
|||
RNSVGTextDecorationDEFAULT = RNSVGTextDecorationNone,
|
||||
};
|
||||
|
||||
static NSString* const RNSVGTextDecorationStrings[] = {@"None", @"Underline", @"Overline", @"LineThrough", @"Blink", nil};
|
||||
static NSString *const RNSVGTextDecorationStrings[] =
|
||||
{@"None", @"Underline", @"Overline", @"LineThrough", @"Blink", nil};
|
||||
|
||||
NSString* RNSVGTextDecorationToString( enum RNSVGTextDecoration fw );
|
||||
NSString *RNSVGTextDecorationToString(enum RNSVGTextDecoration fw);
|
||||
|
||||
enum RNSVGTextDecoration RNSVGTextDecorationFromString( NSString* s );
|
||||
enum RNSVGTextDecoration RNSVGTextDecorationFromString(NSString *s);
|
||||
|
||||
typedef NS_ENUM(NSInteger, RNSVGTextLengthAdjust) {
|
||||
RNSVGTextLengthAdjustSpacing,
|
||||
|
@ -160,11 +154,11 @@ typedef NS_ENUM(NSInteger, RNSVGTextLengthAdjust) {
|
|||
RNSVGTextLengthAdjustDEFAULT = RNSVGTextLengthAdjustSpacing,
|
||||
};
|
||||
|
||||
static NSString* const RNSVGTextLengthAdjustStrings[] = {@"spacing", @"spacingAndGlyphs", nil};
|
||||
static NSString *const RNSVGTextLengthAdjustStrings[] = {@"spacing", @"spacingAndGlyphs", nil};
|
||||
|
||||
NSString* RNSVGTextLengthAdjustToString( enum RNSVGTextLengthAdjust fw );
|
||||
NSString *RNSVGTextLengthAdjustToString(enum RNSVGTextLengthAdjust fw);
|
||||
|
||||
enum RNSVGTextLengthAdjust RNSVGTextLengthAdjustFromString( NSString* s );
|
||||
enum RNSVGTextLengthAdjust RNSVGTextLengthAdjustFromString(NSString *s);
|
||||
|
||||
typedef NS_ENUM(NSInteger, RNSVGTextPathMethod) {
|
||||
RNSVGTextPathMethodAlign,
|
||||
|
@ -172,11 +166,11 @@ typedef NS_ENUM(NSInteger, RNSVGTextPathMethod) {
|
|||
RNSVGTextPathMethodDEFAULT = RNSVGTextPathMethodAlign,
|
||||
};
|
||||
|
||||
static NSString* const RNSVGTextPathMethodStrings[] = {@"align", @"stretch", nil};
|
||||
static NSString *const RNSVGTextPathMethodStrings[] = {@"align", @"stretch", nil};
|
||||
|
||||
NSString* RNSVGTextPathMethodToString( enum RNSVGTextPathMethod fw );
|
||||
NSString *RNSVGTextPathMethodToString(enum RNSVGTextPathMethod fw);
|
||||
|
||||
enum RNSVGTextPathMethod RNSVGTextPathMethodFromString( NSString* s );
|
||||
enum RNSVGTextPathMethod RNSVGTextPathMethodFromString(NSString *s);
|
||||
|
||||
typedef NS_ENUM(NSInteger, RNSVGTextPathMidLine) {
|
||||
RNSVGTextPathMidLineSharp,
|
||||
|
@ -184,11 +178,11 @@ typedef NS_ENUM(NSInteger, RNSVGTextPathMidLine) {
|
|||
RNSVGTextPathMidLineDEFAULT = RNSVGTextPathMidLineSharp,
|
||||
};
|
||||
|
||||
static NSString* const RNSVGTextPathMidLineStrings[] = {@"sharp", @"smooth", nil};
|
||||
static NSString *const RNSVGTextPathMidLineStrings[] = {@"sharp", @"smooth", nil};
|
||||
|
||||
NSString* RNSVGTextPathMidLineToString( enum RNSVGTextPathMidLine fw );
|
||||
NSString *RNSVGTextPathMidLineToString(enum RNSVGTextPathMidLine fw);
|
||||
|
||||
enum RNSVGTextPathMidLine RNSVGTextPathMidLineFromString( NSString* s );
|
||||
enum RNSVGTextPathMidLine RNSVGTextPathMidLineFromString(NSString *s);
|
||||
|
||||
typedef NS_ENUM(NSInteger, RNSVGTextPathSide) {
|
||||
RNSVGTextPathSideLeft,
|
||||
|
@ -196,11 +190,11 @@ typedef NS_ENUM(NSInteger, RNSVGTextPathSide) {
|
|||
RNSVGTextPathSideDEFAULT = RNSVGTextPathSideLeft,
|
||||
};
|
||||
|
||||
static NSString* const RNSVGTextPathSideStrings[] = {@"left", @"right", nil};
|
||||
static NSString *const RNSVGTextPathSideStrings[] = {@"left", @"right", nil};
|
||||
|
||||
NSString* RNSVGTextPathSideToString( enum RNSVGTextPathSide fw );
|
||||
NSString *RNSVGTextPathSideToString(enum RNSVGTextPathSide fw);
|
||||
|
||||
enum RNSVGTextPathSide RNSVGTextPathSideFromString( NSString* s );
|
||||
enum RNSVGTextPathSide RNSVGTextPathSideFromString(NSString *s);
|
||||
|
||||
typedef NS_ENUM(NSInteger, RNSVGTextPathSpacing) {
|
||||
RNSVGTextPathSpacingAutoSpacing,
|
||||
|
@ -208,10 +202,10 @@ typedef NS_ENUM(NSInteger, RNSVGTextPathSpacing) {
|
|||
RNSVGTextPathSpacingDEFAULT = RNSVGTextPathSpacingAutoSpacing,
|
||||
};
|
||||
|
||||
static NSString* const RNSVGTextPathSpacingStrings[] = {@"auto", @"exact", nil};
|
||||
static NSString *const RNSVGTextPathSpacingStrings[] = {@"auto", @"exact", nil};
|
||||
|
||||
NSString* RNSVGTextPathSpacingToString( enum RNSVGTextPathSpacing fw );
|
||||
NSString *RNSVGTextPathSpacingToString(enum RNSVGTextPathSpacing fw);
|
||||
|
||||
enum RNSVGTextPathSpacing RNSVGTextPathSpacingFromString( NSString* s );
|
||||
enum RNSVGTextPathSpacing RNSVGTextPathSpacingFromString(NSString *s);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#if TARGET_OS_OSX
|
||||
#import <React/RCTTextView.h>
|
||||
@interface RNSVGTopAlignedLabel : NSTextView
|
||||
|
||||
@property NSAttributedString *attributedText;
|
||||
@property NSLineBreakMode lineBreakMode;
|
||||
@property NSInteger numberOfLines;
|
||||
@property NSString *text;
|
||||
@property NSTextAlignment textAlignment;
|
||||
#else
|
||||
#import <UIKit/UIKit.h>
|
||||
@interface RNSVGTopAlignedLabel : UILabel
|
||||
#endif
|
||||
@end
|
|
@ -0,0 +1,70 @@
|
|||
// Most (if not all) of this file could probably go away once react-native-macos's version of RCTUIKit.h makes its way
|
||||
// upstream. https://github.com/microsoft/react-native-macos/issues/242
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
#import <React/RCTViewComponentView.h>
|
||||
#endif // RCT_NEW_ARCH_ENABLED
|
||||
|
||||
#if !TARGET_OS_OSX
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#define RNSVGColor UIColor
|
||||
#define RNSVGPlatformView UIView
|
||||
#define RNSVGTextView UILabel
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
#define RNSVGView RCTViewComponentView
|
||||
#else
|
||||
#define RNSVGView UIView
|
||||
#endif // RCT_NEW_ARCH_ENABLED
|
||||
|
||||
#else // TARGET_OS_OSX [
|
||||
|
||||
// Due to name mangling, calling c-style functions from .mm files will fail, therefore we need to wrap them with extern
|
||||
// "C" so they are handled correctly. We also need to have imports positioned in a correct way, so that this extern "C"
|
||||
// wrapper is used before the functions from RCTUIKit are used.
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#import <React/RCTUIKit.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define RNSVGColor NSColor
|
||||
#define RNSVGPlatformView NSView
|
||||
#define RNSVGTextView NSTextView
|
||||
|
||||
@interface RNSVGColor (CGColor)
|
||||
- (NSColor *)CGColor;
|
||||
@end
|
||||
|
||||
@interface RNSVGView :
|
||||
#ifdef RCT_NEW_ARCH_ENABLED
|
||||
RCTViewComponentView
|
||||
#else
|
||||
RCTUIView
|
||||
#endif // RCT_NEW_ARCH_ENABLED
|
||||
|
||||
@property CGPoint center;
|
||||
@property (nonatomic, strong) RNSVGColor *tintColor;
|
||||
|
||||
@end
|
||||
|
||||
// TODO: These could probably be a part of react-native-macos
|
||||
// See https://github.com/microsoft/react-native-macos/issues/658 and
|
||||
// https://github.com/microsoft/react-native-macos/issues/659
|
||||
@interface NSImage (RNSVGMacOSExtensions)
|
||||
@property (readonly) CGImageRef CGImage;
|
||||
@end
|
||||
|
||||
@interface NSValue (RNSVGMacOSExtensions)
|
||||
+ (NSValue *)valueWithCGAffineTransform:(CGAffineTransform)transform;
|
||||
+ (NSValue *)valueWithCGPoint:(CGPoint)point;
|
||||
|
||||
@property (readonly) CGAffineTransform CGAffineTransformValue;
|
||||
@property (readonly) CGPoint CGPointValue;
|
||||
@end
|
||||
|
||||
#endif // ] TARGET_OS_OSX
|
|
@ -6,8 +6,8 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "RNSVGRenderable.h"
|
||||
#import "RNSVGLength.h"
|
||||
#import "RNSVGRenderable.h"
|
||||
|
||||
/**
|
||||
* RNSVG defination are implemented as abstract UIViews for all elements inside Defs.
|
||||
|
|
|
@ -6,11 +6,15 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RNSVGUIKit.h"
|
||||
|
||||
#import "RNSVGVBMOS.h"
|
||||
|
||||
@interface RNSVGViewBox : NSObject
|
||||
|
||||
+ (CGAffineTransform)getTransform:(CGRect)vbRect eRect:(CGRect)eRect align:(NSString *)align meetOrSlice:(RNSVGVBMOS)meetOrSlice;
|
||||
+ (CGAffineTransform)getTransform:(CGRect)vbRect
|
||||
eRect:(CGRect)eRect
|
||||
align:(NSString *)align
|
||||
meetOrSlice:(RNSVGVBMOS)meetOrSlice;
|
||||
|
||||
@end
|
||||
|
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue