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

Re: units

From: Cameron McCormack <cam-www-svg@aka.mcc.id.au>
Date: Tue, 13 Jul 2004 11:20:37 +1000
To: SVG List <www-svg@w3.org>
Message-ID: <20040713012037.GA15498@mcc.id.au>

Hi.

MenTaLguY:
> Here's a bit of a strange question, though perhaps I'm missing something
> obvious..
> 
> Let's say that I have a document like this:
> 
>  <svg width="140px" height="100px" 
>       style="fill:blue;stroke:black;stroke-width:2px">
>    <rect x="20px" y="20px" width="100px" height="20px"/>
>    <path d="M20,60L120,60L120,80L20,80L20,60z"/>
>  </svg>
> 
> The two shapes appear identical, including apparent stroke weight. 
> Fine.
> 
> Now, how do I do this using any other unit besides px?

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.

Cameron

-- 
Cameron McCormack
|  Web: http://mcc.id.au/
|  ICQ: 26955922
Received on Tuesday, 13 July 2004 01:03:00 UTC

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