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>

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

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

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."

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.

Received on Tuesday, 23 February 2010 22:48:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:25 UTC