W3C home > Mailing lists > Public > www-svg@w3.org > July 2004

Re: units

From: MenTaLguY <mental@rydia.net>
Date: Tue, 13 Jul 2004 23:00:37 -0400
To: SVG List <www-svg@w3.org>
Cc: bulia byak <buliabyak@gmail.com>
Message-Id: <1089774036.29958.153.camel@cato.moonbase>
On Mon, 2004-07-12 at 21:20, Cameron McCormack wrote:

> Are you asking whether the lengths in the path data can specify units?
> If so, then the answer is no.  The grammar at
> http://www.w3.org/TR/SVG11/paths.html#PathDataBNF allows only plain
> numbers.

That's what I understood...

What I'm asking, I guess, is if there's an way at all to indirectly
dimension a path using absolute units like pt or mm or whatever.

I would have expected something (at least) like this to yield two
rectangles of equal sizes:

 <svg width="100pt" height="100pt" viewBox="0 0 100 100">
   <rect x="25pt" y="25pt" width="50pt" height="25pt" fill="red"/>
   <path d="M25,50L75,50L75,75L25,75L25,50z" fill="blue"/>
 </svg>

..but if I remember correctly from my experiments, it does not seem to.

Does this mean that, except perhaps for setting page dimensions, units
like pt or mm are not usable in SVG?

-mental

Received on Wednesday, 14 July 2004 00:07:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:54 UTC