Re: [fxtf-drafts] [filter-effects-1] feDropShadowElement definition does not match implementations (#343)

Because it's a single primitive, the clipping should logically be performed at the end of the operation. And that's a nicer result for authors, anyway. But this means that the equivalent representation needs to include calculations for the filter region of the intermediate steps that is large enough to avoid premature clipping.

The following code (apply the offset prior to blurring, and set an explicit filter region on the offset to avoid clipping at that stage) creates a fairly close rendering match in Chrome (the blurring algorithm isn't exactly the same, but the blurring algorithm is also not defined in the spec):

```xml
        <filter id="proposedDropShadow">
            <feOffset in2="SourceAlpha" dx="50" dy="50"
                      width="calc(120% + 50)" height="calc(120% + 50)"/>
            <feGaussianBlur stdDeviation="30" result="offsetblur" />
            <feFlood flood-color="green" flood-opacity="1"/>
            <feComposite in2="offsetblur" operator="in"/>
            <feMerge>
                <feMergeNode/>
                <feMergeNode in="SourceGraphic"/>
            </feMerge>
        </filter>
```

But… Firefox still clips the `feOffset` result, even if I replace the `calc()` expressions with equivalent large single values (e.g., 250% or 500px). But maybe that's worth a separate issue discussion.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/343#issuecomment-501931829 using your GitHub account

Received on Friday, 14 June 2019 01:11:18 UTC