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

Re: Clarification on object bounding box specification

From: Robert Longson <longsonr@gmail.com>
Date: Thu, 14 Feb 2013 10:34:22 +0000
Message-ID: <CAOu7Uv5HmwLfMcEMFhfzTfGwKt=Skt_Rc2Dk7pSS571mmiTTjA@mail.gmail.com>
To: www-svg@w3.org
> 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.

Firefox does follow the spec's wording though! In many cases it won't
draw a horizontal/vertical
pattern or gradient. For instance we pass

So I'm sure you're now asking what's special about this case?

We'll disable the pattern in two cases when the width or height of the
object is zero:

a) there's no viewBox and the pattern content units are objectBoundingBox
b) there is a viewBox and the pattern units are objectBoundingBox

This is because:

The SVG specification says that the 'patternContentUnits' attribute
"has no effect if
attribute ‘viewBox’ is specified". We still need to include a bbox scale
if the viewBox is specified and _patternUnits_ is set to or defaults to
objectBoundingBox though, since in that case the viewBox is relative to the bbox

We wrote this code not so long ago to get our implementation to pass

So are we right in our pattern logic?

Best regards

Received on Thursday, 14 February 2013 10:34:54 UTC

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