W3C home > Mailing lists > Public > www-svg@w3.org > February 2010

Filter on text

From: Dirk Schulze <vbs85@gmx.de>
Date: Tue, 23 Feb 2010 23:48:01 +0100
To: www-svg@w3.org
Message-ID: <1266965281.24128.12.camel@dirk-laptop>
Hi,

I have a question about objectBoundingBox on texts in combination with
filters.
Short example:

<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
    <filter id="filter">
        <feFlood flood-color="green"/>
    </filter>
</defs>
<text x="100" y="100">This is a <tspan
filter="url(#filter)">test</tspan> .</text>
</svg>

Chapter 10.4 in the Spec says the following:
"It is possible to apply a gradient, pattern, clipping path, mask or
filter to text. When one of these facilities is applied to text and
keyword objectBoundingBox is used (see Object bounding box units) to
specify a graphical effect relative to the "object bounding box", then
the object bounding box units are computed relative to the entire 'text'
element in all cases, even when different effects are applied to
different 'tspan' elements within the same 'text' element."
(http://www.w3.org/TR/SVG/text.html#TextElement)

The filter, that gets applied to tspan, uses objectBoundingBox for
filterUnits. So, shouldn't the complete text get overlayed by a green
rect? FF and Opera just fill "test" with a green rect.

Thanks,
Dirk
Received on Tuesday, 23 February 2010 22:48:39 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:44 GMT