W3C home > Mailing lists > Public > www-svg@w3.org > June 2008

more BackgroundImage/enable-background issues

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 5 Jun 2008 21:33:34 +1200
Message-ID: <11e306600806050233i358ea0dcxdf8a0c06fe7cb5d5@mail.gmail.com>
To: www-svg <www-svg@w3.org>
The spec for 'enable-background:new' says:
"These parameters enable the SVG user agent potentially to allocate smaller
temporary image buffers than the default values, which might require the SVG
user agent to allocate buffers as large as the current viewport."
This suggests that pixels outside the viewport will not be needed to
construct a BackgroundImage. But consider the following example:

<svg xmlns="http://www.w3.org/2000/svg" style="enable-background:new;">
    <filter id="f1" filterUnits="objectBoundingBox" x="-1" y="0" width="2"
      <feMorphology in="BackgroundImage" operator="dilate" radius="200"/>
  <rect x="-100" y="100" width="100" height="100" fill="lime"/>
  <rect x="0" y="100" width="100" height="100" filter="url(#f1)"/>

In this example the filter region extends outside the viewport. The lime
rect will be clipped by the viewport, but the spec is explicit that clipping
due to ancestors does not affect the BackgroundImage. As far as I can tell,
the BackgroundImage should be 200x100, the left half filled with lime; the
filter result is a 200x100 lime rectangle; and after clipping to the
viewport the final rendering should be a lime rect at (0,100)-(100,200).
(Opera renders this incorrectly BTW, it seems to clip to the viewport while
constructing the BackgroundImage.)

I suggest that the text "which might require the SVG user agent to allocate
buffers as large as the current viewport." be deleted.

"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
Received on Thursday, 5 June 2008 09:34:12 UTC

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