- From: Dirk Schulze via GitHub <sysbot+gh@w3.org>
- Date: Mon, 16 Sep 2019 08:19:56 +0000
- To: public-fxtf-archive@w3.org
Here a simple example of `feColorTransfer`: https://codepen.io/krit/pen/qBWyMwe
```xml
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<filter id="f1" filterUnits="userSpaceOnUse" primitiveUnits="userSpaceOnUse">
<feComponentTransfer>
<feFuncR type="linear" slope="0"/>
<feFuncG type="linear" slope="0"/>
<feFuncB type="linear" slope="0"/>
<feFuncA type="linear" intercept="1"/>
<feComponentTransfer>
</filter>
<rect x="50" y="50" width="100" height="100" fill="#00ff00" stroke="black" stroke-width="20" filter="url(#f1)"/>
</svg>
```
The example has a rectangle with a `fill` and `stroke`. The filter makes the content of the primitive input solid black.
* Firefox uses the filter region as input image size. Which results into the entire filter region to get filled (input image size 600x600).
* Chrome does the same as Firefox (input image size 600x600)
* Safari takes the visual bounding box of the filtered element as input size (input image size 110x110).
* For Adobe products, Adobe Photoshop does what Chrome/Firefox do, Adobe Illustrator what Safari does. Didn't test other implementations yet.
As @mstange said, we should clearly specify what the input image size is. Visual bounds sounds like a bad idea since these are subjective to implementation internals. I think I agree with @mstange that we should use the filter region as input.
--
GitHub Notification of comment by dirkschulze
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/324#issuecomment-531682521 using your GitHub account
Received on Monday, 16 September 2019 08:19:58 UTC