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:
Jakub Grzywacz
2024-10-25 11:18:07 +02:00
committed by GitHub
parent 525d09ef34
commit 4637dee1e4
51 changed files with 1372 additions and 6 deletions
+18
View File
@@ -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) {