1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | #import <React/UIView+React.h>
|
10 | #import "RNSVGCGFCRule.h"
|
11 | #import "RNSVGSvgView.h"
|
12 | @class RNSVGGroup;
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | @interface RNSVGNode : UIView
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | extern CGFloat const RNSVG_M_SQRT1_2l;
|
27 | extern CGFloat const RNSVG_DEFAULT_FONT_SIZE;
|
28 |
|
29 | @property (nonatomic, strong) NSString *name;
|
30 | @property (nonatomic, assign) CGFloat opacity;
|
31 | @property (nonatomic, assign) RNSVGCGFCRule clipRule;
|
32 | @property (nonatomic, strong) NSString *clipPath;
|
33 | @property (nonatomic, strong) NSString *mask;
|
34 | @property (nonatomic, strong) NSString *markerStart;
|
35 | @property (nonatomic, strong) NSString *markerMid;
|
36 | @property (nonatomic, strong) NSString *markerEnd;
|
37 | @property (nonatomic, assign) BOOL responsible;
|
38 | @property (nonatomic, assign) CGAffineTransform matrix;
|
39 | @property (nonatomic, assign) CGAffineTransform transforms;
|
40 | @property (nonatomic, assign) CGAffineTransform invmatrix;
|
41 | @property (nonatomic, assign) CGAffineTransform invTransform;
|
42 | @property (nonatomic, assign) BOOL active;
|
43 | @property (nonatomic, assign) BOOL dirty;
|
44 | @property (nonatomic, assign) BOOL merging;
|
45 | @property (nonatomic, assign) BOOL skip;
|
46 | @property (nonatomic, assign) CGPathRef path;
|
47 | @property (nonatomic, assign) CGPathRef strokePath;
|
48 | @property (nonatomic, assign) CGRect clientRect;
|
49 | @property (nonatomic, assign) CGRect pathBounds;
|
50 | @property (nonatomic, copy) RCTDirectEventBlock onLayout;
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 | @property (nonatomic, readonly, weak) RNSVGSvgView *svgView;
|
57 | @property (nonatomic, readonly, weak) RNSVGGroup *textRoot;
|
58 |
|
59 | - (void)invalidate;
|
60 |
|
61 | - (RNSVGGroup *)getParentTextRoot;
|
62 |
|
63 | - (void)renderTo:(CGContextRef)context rect:(CGRect)rect;
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | - (void)renderLayerTo:(CGContextRef)context rect:(CGRect)rect;
|
71 |
|
72 |
|
73 |
|
74 |
|
75 | - (CGPathRef)getClipPath;
|
76 |
|
77 |
|
78 |
|
79 |
|
80 | - (CGPathRef)getClipPath:(CGContextRef)context;
|
81 |
|
82 |
|
83 |
|
84 |
|
85 | - (void)clip:(CGContextRef)context;
|
86 |
|
87 |
|
88 |
|
89 |
|
90 | - (CGPathRef)getPath:(CGContextRef) context;
|
91 |
|
92 | - (CGFloat)relativeOnWidthString:(NSString *)length;
|
93 |
|
94 | - (CGFloat)relativeOnHeightString:(NSString *)length;
|
95 |
|
96 | - (CGFloat)relativeOnOtherString:(NSString *)length;
|
97 |
|
98 | - (CGFloat)relativeOn:(RNSVGLength *)length relative:(CGFloat)relative;
|
99 |
|
100 | - (CGFloat)relativeOnWidth:(RNSVGLength *)length;
|
101 |
|
102 | - (CGFloat)relativeOnHeight:(RNSVGLength *)length;
|
103 |
|
104 | - (CGFloat)relativeOnOther:(RNSVGLength *)length;
|
105 |
|
106 | - (CGFloat)getFontSizeFromContext;
|
107 |
|
108 | - (CGFloat)getContextWidth;
|
109 |
|
110 | - (CGFloat)getContextHeight;
|
111 |
|
112 |
|
113 |
|
114 |
|
115 | - (void)parseReference;
|
116 |
|
117 | - (void)beginTransparencyLayer:(CGContextRef)context;
|
118 |
|
119 | - (void)endTransparencyLayer:(CGContextRef)context;
|
120 |
|
121 | - (void)traverseSubviews:(BOOL (^)(__kindof UIView *node))block;
|
122 |
|
123 | - (void)clearChildCache;
|
124 |
|
125 | - (void)clearPath;
|
126 |
|
127 | @end
|