mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-01 06:07:41 +00:00
finish gradients refactor
This commit is contained in:
@@ -18,6 +18,4 @@ RCT_EXPORT_MODULE()
|
||||
return [RNSVGClipPath new];
|
||||
}
|
||||
|
||||
RCT_EXPORT_VIEW_PROPERTY(name, NSString)
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#import "RNSVGNodeManager.h"
|
||||
|
||||
@interface RNSVGLinearGradientManager : RNSVGNodeManager
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#import "RNSVGLinearGradientManager.h"
|
||||
#import "RNSVGLinearGradient.h"
|
||||
|
||||
@implementation RNSVGLinearGradientManager
|
||||
|
||||
RCT_EXPORT_MODULE()
|
||||
|
||||
- (RNSVGNode *)node
|
||||
{
|
||||
return [RNSVGLinearGradient new];
|
||||
}
|
||||
|
||||
RCT_EXPORT_VIEW_PROPERTY(x1, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(y1, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(x2, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(y2, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(gradient, NSArray<NSNumber *>)
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#import "RNSVGNodeManager.h"
|
||||
|
||||
@interface RNSVGRadialGradientManager : RNSVGNodeManager
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#import "RNSVGRadialGradientManager.h"
|
||||
#import "RNSVGRadialGradient.h"
|
||||
|
||||
@implementation RNSVGRadialGradientManager
|
||||
|
||||
RCT_EXPORT_MODULE()
|
||||
|
||||
- (RNSVGNode *)node
|
||||
{
|
||||
return [RNSVGRadialGradient new];
|
||||
}
|
||||
|
||||
RCT_EXPORT_VIEW_PROPERTY(fx, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(fy, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(rx, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(ry, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(cx, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(cy, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(gradient, NSArray<NSNumber *>)
|
||||
|
||||
@end
|
||||
@@ -21,8 +21,10 @@ RCT_EXPORT_MODULE()
|
||||
}
|
||||
|
||||
RCT_EXPORT_VIEW_PROPERTY(fill, RNSVGBrush)
|
||||
RCT_EXPORT_VIEW_PROPERTY(fillOpacity, CGFloat)
|
||||
RCT_EXPORT_VIEW_PROPERTY(fillRule, RNSVGCGFCRule)
|
||||
RCT_EXPORT_VIEW_PROPERTY(stroke, RNSVGBrush)
|
||||
RCT_EXPORT_VIEW_PROPERTY(strokeOpacity, CGFloat)
|
||||
RCT_EXPORT_VIEW_PROPERTY(strokeWidth, CGFloat)
|
||||
RCT_EXPORT_VIEW_PROPERTY(strokeLinecap, CGLineCap)
|
||||
RCT_EXPORT_VIEW_PROPERTY(strokeLinejoin, CGLineJoin)
|
||||
|
||||
@@ -18,7 +18,7 @@ RCT_EXPORT_MODULE()
|
||||
return [RNSVGUse new];
|
||||
}
|
||||
|
||||
|
||||
RCT_EXPORT_VIEW_PROPERTY(href, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(mergeList, NSArray<NSString *>)
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user