W3C home > Mailing lists > Public > www-svg@w3.org > January 2011

Re: Why the positiveness constraint in width and height parameters of the viewBox attribute?

From: Erik Dahlstrom <ed@opera.com>
Date: Mon, 24 Jan 2011 16:42:28 +0100
To: www-svg@w3.org
Message-ID: <op.vptkkzh8geuyw5@localhost>
On Thu, 20 Jan 2011 22:08:49 +0100, <giampaolo@tomassoni.biz> wrote:

> Hi,
>
> I can't get why the 22 June 2010's SVG Working Draft do states the  
> following:
>
> "A negative value for <width> or <height> is an error (see Error
> processing)."
>
> (see http://www.w3.org/TR/SVG11/coords.html#ViewBoxAttribute, third
> pharagraph).

It's been that way since SVG 1.0, see  
http://www.w3.org/TR/SVG10/coords.html#ViewBoxAttribute.

> Having a negative <height> value may be an invaluably simple way to map a
> classic cartesian coordinate system into the SVG standard one.
>
> I can't see any reason why forbid this. Besides, the resulting
> transformation matrix is generally invertible. The only way one can get a
> singular matrix is setting <width> and/or <height> to 0, which is covered
> anyway by the SVG draft (no rendering of the drawing).

One minor concern that comes to mind is that it would cause existing svg  
user agents to ignore the viewBox containing the negative width/height.


-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Monday, 24 January 2011 15:43:04 GMT

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