finish gradients refactor

This commit is contained in:
Horcrux
2016-07-20 22:38:45 +08:00
parent 18e1b60823
commit ff2395bcc2
64 changed files with 804 additions and 605 deletions
+22
View File
@@ -15,6 +15,7 @@
{
NSMutableDictionary<NSString *, RNSVGNode *> *clipPaths;
NSMutableDictionary<NSString *, RNSVGNode *> *templates;
NSMutableDictionary<NSString *, RNSVGBrushConverter *> *brushConverters;
}
- (void)insertReactSubview:(UIView *)subview atIndex:(NSInteger)atIndex
@@ -104,4 +105,25 @@
return templates ? [templates objectForKey:tempalteRef] : nil;
}
- (void)defineBrushConverter:(RNSVGBrushConverter *)brushConverter brushConverterRef:(NSString *)brushConverterRef
{
if (!brushConverters) {
brushConverters = [[NSMutableDictionary alloc] init];
}
[brushConverters setObject:brushConverter forKey:brushConverterRef];
}
- (void)removeBrushConverter:(NSString *)brushConverterRef
{
if (brushConverters) {
[brushConverters removeObjectForKey:brushConverterRef];
}
}
- (RNSVGBrushConverter *)getDefinedBrushConverter:(NSString *)brushConverterRef
{
return brushConverters ? [brushConverters objectForKey:brushConverterRef] : nil;
}
@end