feat: implement filter region (#2441)

# Summary

Implement proper handling for filter region according to the specs:
*
[FilterEffectsRegion](https://www.w3.org/TR/SVG11/filters.html#FilterEffectsRegion)
*
[FilterPrimitiveSubRegion](https://www.w3.org/TR/SVG11/filters.html#FilterPrimitiveSubRegion)

enabling user to specify 
* `filterUnits`
* `primitiveUnits`
* `x`
* `y`
* `width`
* `height`

on `Filter` element and the last four on filter primitives.

## Compatibility

| OS      | Implemented |
| ------- | :---------: |
| iOS     |          |
| MacOS   |         |
| Android |          |
| Web     |          |
This commit is contained in:
Jakub Grzywacz
2024-09-12 12:13:05 +02:00
committed by GitHub
parent 967886d40c
commit 85be1d0bac
15 changed files with 271 additions and 84 deletions

View File

@@ -28,7 +28,7 @@ class ReferenceExample extends Component {
const icon = (
<Svg height="30" width="30" viewBox="0 0 20 20">
<Filter id="iconOffset">
<Filter id="iconOffset" width="1.5" height="1.5">
<FeOffset dx="5" dy="5" />
</Filter>
<Rect x="0" y="0" width="15" height="15" fill="red" />