mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-01 22:25:12 +00:00
feat: FeComposite filter (#2433)
# Summary <img width="324" alt="image" src="https://github.com/user-attachments/assets/0a9b4a56-d093-49f7-aacd-c198ee00f256"> ## Test Plan Examples app -> Filters -> FeComposite ## Compatibility | OS | Implemented | | ------- | :---------: | | iOS | ✅ | | macOS | ❌* | | Android | ✅ | | Web | ✅ | _*_ macOS isn't working as: * `CGBitmapContextCreateImage` always returns null * FeFlood isn't aligned properly (will be fixed in the following PR)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
#import "RNSVGFilterPrimitiveManager.h"
|
||||
|
||||
@interface RNSVGFeCompositeManager : RNSVGFilterPrimitiveManager
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,22 @@
|
||||
#import "RNSVGFeCompositeManager.h"
|
||||
#import "RNSVGCompositeOperator.h"
|
||||
#import "RNSVGFeComposite.h"
|
||||
|
||||
@implementation RNSVGFeCompositeManager
|
||||
|
||||
RCT_EXPORT_MODULE()
|
||||
|
||||
- (RNSVGFeComposite *)node
|
||||
{
|
||||
return [RNSVGFeComposite new];
|
||||
}
|
||||
|
||||
RCT_EXPORT_VIEW_PROPERTY(in1, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(in2, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(operator1, RNSVGCompositeOperator)
|
||||
RCT_EXPORT_VIEW_PROPERTY(k1, NSNumber *)
|
||||
RCT_EXPORT_VIEW_PROPERTY(k2, NSNumber *)
|
||||
RCT_EXPORT_VIEW_PROPERTY(k3, NSNumber *)
|
||||
RCT_EXPORT_VIEW_PROPERTY(k4, NSNumber *)
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user