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

Clarification on object bounding box specification

From: Philip Rogers <pdr@google.com>
Date: Wed, 13 Feb 2013 13:28:01 -0800
Message-ID: <CAJgFLLthwingpg42VGxnHi76_kNuFUK895dBVd4jJaoUFiNh+w@mail.gmail.com>
To: "www-svg@w3.org" <www-svg@w3.org>

The following wording is currently in the spec:
"Keyword objectBoundingBox should not be used when the geometry of the
applicable element has no width or no height, such as the case of a
horizontal or vertical line, even when the line has actual thickness when
viewed due to having a non-zero stroke width since stroke width is ignored
for bounding box calculations. When the geometry of the applicable element
has no width or height and objectBoundingBox is specified, then the given
effect (e.g., a gradient or a filter) will be ignored."

For patterns/gradients, this is not intuitive. A horizontal line has an
empty bounding box and will not be stroked with a pattern. A slightly
rotated line will be stroked with a pattern.

Opera, IE10*, and Chrome* all follow the spec's wording.
Firefox does not, and renders the stroked, horizontal patterned line.

I think Firefox's implementation is the most intuitive for end users and I
would like to propose we align on their interpretation of the spec.

Testcase: http://philbit.com/emptyPattern.svg
Chrome bug: https://code.google.com/p/chromium/issues/detail?id=175779


* Both IE10 and WebKit have a similar bug where the pattern shows up after
a relayout.
Received on Wednesday, 13 February 2013 21:28:49 UTC

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