feat: add FeGaussianBlur filter (#2352)

# Summary

Continuation of #2316 
Introducing new filter `FeGaussianBlur`.

### Implementation notes

On Android there is no easy way to fully implement Gaussian blur, as
there is no native api for this. While a basic implementation is
possible with `RenderScript`, it does not allow for blur in one axis and
greater than `25`

## Test Plan

Example app -> Filters -> FeGaussianBlur

## Compatibility

| OS      | Implemented |
| ------- | :---------: |
| iOS     |         |
| Android |         |
This commit is contained in:
Jakub Grzywacz
2024-07-25 11:46:45 +02:00
committed by GitHub
parent ba7d77548f
commit 44254df9fb
27 changed files with 624 additions and 13 deletions
+15 -1
View File
@@ -23,7 +23,7 @@
}
}
+ (RNSVGColorMatrixType)RNSVGColorMatrixTypeFromCppEquivalent:(react::RNSVGFeColorMatrixType)type;
+ (RNSVGColorMatrixType)RNSVGColorMatrixTypeFromCppEquivalent:(react::RNSVGFeColorMatrixType)type
{
switch (type) {
case react::RNSVGFeColorMatrixType::Matrix:
@@ -37,6 +37,20 @@
}
}
+ (RNSVGEdgeMode)RNSVGEdgeModeFromCppEquivalent:(react::RNSVGFeGaussianBlurEdgeMode)edgeMode
{
switch (edgeMode) {
case react::RNSVGFeGaussianBlurEdgeMode::Duplicate:
return SVG_EDGEMODE_DUPLICATE;
case react::RNSVGFeGaussianBlurEdgeMode::Wrap:
return SVG_EDGEMODE_WRAP;
case react::RNSVGFeGaussianBlurEdgeMode::None:
return SVG_EDGEMODE_NONE;
default:
return SVG_EDGEMODE_UNKNOWN;
}
}
@end
#endif // RCT_NEW_ARCH_ENABLED