W3C home > Mailing lists > Public > public-fxtf-archive@w3.org > November 2018

[fxtf-drafts] Trying to understand the correct FillPaint/StrokePaint behavior

From: Evgeniy Reizner via GitHub <sysbot+gh@w3.org>
Date: Mon, 19 Nov 2018 19:11:45 +0000
To: public-fxtf-archive@w3.org
Message-ID: <issues.opened-382354400-1542654703-sysbot+gh@w3.org>
RazrFalcon has just created a new issue for https://github.com/w3c/fxtf-drafts:

== Trying to understand the correct FillPaint/StrokePaint behavior ==
https://drafts.fxtf.org/filter-effects/#attr-valuedef-in-fillpaint

Input:

```xml
<svg id="svg1" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
    <linearGradient id="lg1">
        <stop offset="0" stop-color="white"/>
        <stop offset="1" stop-color="green"/>
    </linearGradient>
    <filter id="filter1">
        <feGaussianBlur stdDeviation="4" in="FillPaint"/>
    </filter>
    <circle id="circle1" cx="100" cy="100" r="80" fill="url(#lg1)" filter="url(#filter1)"/>
    <rect id="frame" x="1" y="1" width="198" height="198" fill="none" stroke="black"/>
</svg>
```

Results:
![1542654144](https://user-images.githubusercontent.com/725494/48728952-18533080-ec3f-11e8-8299-bcad4aeb96f4.png)


As you can see, everyone produces different results. I assume that Firefox is the closest one, but it ignores blur completely.

Same problem, but with pattern:

```xml
<svg id="svg1" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
    <pattern id="patt1" patternUnits="userSpaceOnUse" width="20" height="20">
        <rect id="rect1" x="0" y="0" width="10" height="10" fill="grey"/>
        <rect id="rect2" x="10" y="10" width="10" height="10" fill="green"/>
    </pattern>
    <filter id="filter1">
        <feGaussianBlur stdDeviation="1" in="FillPaint"/>
    </filter>
    <circle id="circle1" cx="100" cy="100" r="80" fill="url(#patt1)" filter="url(#filter1)"/>
    <rect id="frame" x="1" y="1" width="198" height="198" fill="none" stroke="black"/>
</svg>
```

![1542654363](https://user-images.githubusercontent.com/725494/48728995-2ef98780-ec3f-11e8-9e3a-954a3758a350.png)

And again I assume that Firefox is the correct one, but I'm not sure that original pattern coordinates are correct. They start at 0,0 of the canvas, but not at 0,0 of the filter region. Not sure which one is correct.

Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/323 using your GitHub account
Received on Monday, 19 November 2018 19:11:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 November 2018 00:46:02 UTC