mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-04 15:44:24 +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:
@@ -55,6 +55,24 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ (RNSVGCompositeOperator)RNSVGRNSVGCompositeOperatorFromCppEquivalent:(react::RNSVGFeCompositeOperator1)operator1
|
||||
{
|
||||
switch (operator1) {
|
||||
case react::RNSVGFeCompositeOperator1::Over:
|
||||
return SVG_FECOMPOSITE_OPERATOR_OVER;
|
||||
case react::RNSVGFeCompositeOperator1::In:
|
||||
return SVG_FECOMPOSITE_OPERATOR_IN;
|
||||
case react::RNSVGFeCompositeOperator1::Out:
|
||||
return SVG_FECOMPOSITE_OPERATOR_OUT;
|
||||
case react::RNSVGFeCompositeOperator1::Atop:
|
||||
return SVG_FECOMPOSITE_OPERATOR_ATOP;
|
||||
case react::RNSVGFeCompositeOperator1::Xor:
|
||||
return SVG_FECOMPOSITE_OPERATOR_XOR;
|
||||
case react::RNSVGFeCompositeOperator1::Arithmetic:
|
||||
return SVG_FECOMPOSITE_OPERATOR_ARITHMETIC;
|
||||
}
|
||||
}
|
||||
|
||||
+ (RNSVGEdgeMode)RNSVGEdgeModeFromCppEquivalent:(react::RNSVGFeGaussianBlurEdgeMode)edgeMode
|
||||
{
|
||||
switch (edgeMode) {
|
||||
|
||||
Reference in New Issue
Block a user