feat: add FeMerge and FeMergeNode filters (#2369)

# Summary

As mentioned in #2362
Introduce new filters:
* `FeMerge`
* `FeMergeNode`

## Example usage

```tsx
<Svg width="200" height="200">
  <Filter id="mergeWithOffset" width="180" height="180">
    <FeOffset dx="50" dy="50" result="test" />
    <FeOffset dx="100" dy="100" in="SourceGraphic" />
    <FeMerge>
      <FeMergeNode in="SourceGraphic" />
      <FeMergeNode in="test" />
      <FeMergeNode />
    </FeMerge>
  </Filter>
  <Rect
    x="0"
    y="0"
    width="100"
    height="100"
    stroke="black"
    fill="red"
    filter="url(#mergeWithOffset)"
  />
</Svg>
```

<img width="207" alt="image"
src="https://github.com/user-attachments/assets/9cb3ded6-f939-4b2b-8ece-df54e64fe898">

## Test Plan

`Example` app -> `Filters` -> `FeMerge`

## Compatibility

| OS      | Implemented |
| ------- | :---------: |
| iOS     |         |
| Android |         |

## Checklist

- [x] I have tested this on a device and a simulator
- [x] I added documentation in `README.md`
- [x] I updated the typed files (typescript)
This commit is contained in:
Jakub Grzywacz
2024-07-31 13:23:53 +02:00
committed by GitHub
parent a2e843bc9c
commit b8b022c31e
25 changed files with 508 additions and 9 deletions

View File

@@ -19,6 +19,7 @@ module.exports = {
'RNSVGDefsComponentDescriptor',
'RNSVGFeColorMatrixComponentDescriptor',
'RNSVGFeGaussianBlurComponentDescriptor',
'RNSVGFeMergeComponentDescriptor',
'RNSVGFeOffsetComponentDescriptor',
'RNSVGFilterComponentDescriptor',
'RNSVGEllipseComponentDescriptor',