Re: Are centimeters second class units?

At 8:37 PM -0800 12/11/00, Jon Ferraiolo wrote:
>I am following up with some sample code:
><svg x="0" y="0" width="1cm" height="1cm"
>         viewBox="0 0 1000 1000"
>         style="overflow:visible">
>   <rect x="1000" y="1000" width="3000" height="3000" style="fill:red"/>
>The above code is just one way to approach the problem. I'll explain 
>what the above code does:
>The first line:
>     (a) specifies (via the 'width' and 'height' attributes) a 
>viewing region that is 1cm by 1cm
>     (b) specifies (via the 'viewBox' attribute) that user coordinate 
>(0,0) maps to the top/left of the viewing region and user coordinate 
>(1000,1000) maps to the bottom right of the viewing region (i.e., 
>the location that is 1cm down and to the right of the origin)
>     (c) specifies (via overflow:visible) that there should be no 
>automatic clipping at the bounds of the viewing region

Thanks. I'm slowly getting this. So if I understand there are two 
coordinate spaces in an SVG document:

1. The local, user coordinates, an infinite plane of non-dimensional numbers

2. The viewBox coordinates, that merely maps the user coordinates 
onto the local screen right now. All items specified with units, be 
they pixels, centimeters, inches, or anything else are in viewBox 

I'm asking for a third set of coordinates which could be mapped to 
the first two:

3. Real world coordinates, which reflect the actual physical 
dimensions of the objects being modeled and always have units; and 
I'd like dimensional numbers specifying the width, height, position, 
etc. of shapes to be given in real-world units; and an option to set 
the width and height of the svg element as a percentage of the real 
world units.

This is more or less how VRML works. This allows a chair I design to 
be placed in the living room you design with a reasonable degree of 
certainty that my chair won't be bigger than your living room. Does 
SVG really have no way of doing this? It seems so obviously necessary 
to me, but maybe it's just outside the problem domain SVG is trying 
to address.

| Elliotte Rusty Harold | | Writer/Programmer |
|                  The XML Bible (IDG Books, 1999)                   |
|                   |
|   |
|  Read Cafe au Lait for Java News: |
|  Read Cafe con Leche for XML News:     |

Received on Tuesday, 12 December 2000 12:21:21 UTC