W3C home > Mailing lists > Public > www-svg@w3.org > August 2012

Re: Clarification on getBBox() with shapes of zero width

From: Dirk Schulze <dschulze@adobe.com>
Date: Tue, 7 Aug 2012 13:47:36 -0700
To: Rick <graham.rick@gmail.com>
CC: Robert Longson <longsonr@gmail.com>, "www-svg@w3.org" <www-svg@w3.org>, "jackalmage@gmail.com" <jackalmage@gmail.com>, "pdr@google.com" <pdr@google.com>
Message-ID: <1CB0EE32-B8B4-4AB6-9DD6-46E65EF1D790@adobe.com>

On Aug 7, 2012, at 12:23 PM, Rick <graham.rick@gmail.com> wrote:

> 
> On Tue, Aug 7, 2012 at 2:51 PM, Robert Longson <longsonr@gmail.com> wrote:
> In most cases nobody wants this so why clutter up UA code with it. In the extremely rare cases you need it I don't see why the svg file shouldn't have an "ugly hack" rather than having dozens of lines of mostly unused ugly hack UA code handle it.
> 
> 
> As a content developer, I expect the geometry of SVG elements to be correct.
> 
> Let me suggest this another way then.
> 
> I don't think introducing illogical hacks into the SVG spec to solve coding problems for specific UA's sets a good precedent.
> 
> As a former UA implementer, I ask, what impact does this have on other UA's?  Should they adopt your hack because you don't want to check for a zero in your rendering pipeline?

It is not necessarily a hack. It is an inconsistency in the spec. A lot of engines create renderers for rendering content. A shape with one dimension does not get rendered and is in error. That is the spec text. So if it is in error, why do you expect reasonable results from it? It is not just Firefox that behaves like that, but also WebKit and all WebKit based browsers/applications.

Greetings,
Dirk

>  
> 
> Robert
> 
> 
> On 7 August 2012 19:47, Rick <graham.rick@gmail.com> wrote:
> 
> 
> On Tue, Aug 7, 2012 at 2:03 PM, Robert Longson <longsonr@gmail.com> wrote:
> >> If you want the shape included then give it a small non-zero width/height hidden visibility.
> 
> Making a rectangle of zero width not render is logical, but it is still a legal rectangle object and can be interacted with, so it should have geometry semantics.
> 
> Giving zero widths/heights a small value is an ugly hack.  There must be a better way.
> 
> Is there no bottleneck in Cairo where you could discard ineligible shapes?
> 
> -- 
> "A child is a person who can't understand why someone would give away a perfectly good kitten."
> -- Doug Larson
> 
> 
> 
> 
> -- 
> "A child is a person who can't understand why someone would give away a perfectly good kitten."
> -- Doug Larson
Received on Tuesday, 7 August 2012 20:48:06 GMT

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