W3C home > Mailing lists > Public > public-fx@w3.org > October to December 2012

[filter-effects] FillPaint/StrokePaint on HTML elements

From: Dirk Schulze <dschulze@adobe.com>
Date: Wed, 7 Nov 2012 07:22:01 -0800
To: "public-fx@w3.org" <public-fx@w3.org>
CC: "robert@ocallahan.org" <robert@ocallahan.org>, Robert Longson <longsonr@gmail.com>
Message-ID: <75A98DD6-02E9-47DD-ACDB-704A74E612DA@adobe.com>
Hi,

SVG Filters had some so called pseudo filter primitives (SourceGraphic, SourceAlpha, BackgroundImage, BackgroundAlpha, FillPaint, StrokePaint). We have two issues in the spec to this topic. What should we do with FillPaint and StrokePaint on HTML elements?

Short explanation:
FillPaint: This keyword represents the value of the ‘fill’ property on the target element for the filter effect.
StrokePaint: This keyword represents the value of the ‘stroke’ property on the target element for the filter effect.

'fill' and 'stroke' currently just apply to SVG shapes and text content elements. This does not include HTML elements. This is why Filter Effects currently suggest taking transparent black on HTML elements for these keywords. However, Firefox still uses the values of these properties, independent if the element is an HTML or SVG element.

I would be in favor for relaxing the restriction and follow Firefox. I am not sure if that necessarily means that 'fill' and 'stroke' apply to all elements in the future. That might need to be discussed in an FXTF call. If there are no objections, I will go ahead and do the changes.

Examples:

<!DOCTYPE html>
<html lang="en">
<body>
<div style="width:100px;height:100px;stroke:green;filter:url(#f)"></div>
<svg>
<filter id="f">
<feOffset in="StrokePaint"/>
</filter>
</svg>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<body>
<div style="width:100px;height:100px;fill:green;filter:url(#f)"></div>
<svg>
<filter id="f">
<feOffset in="FillPaint"/>
</filter>
</svg>
</body>
</html>

Both rects are green in Firefox.

Greetings,
Dirk
Received on Wednesday, 7 November 2012 15:22:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 November 2012 15:22:28 GMT