Re: Transformations with units

On Mar 3, 2012, at 5:45 AM, Dr. Olaf Hoffmann wrote:

> Tanguy Ortolo:
> 
>> Well, I guess natural units would not have a very high popularity then,
>> most SVG drawings must be using pixels…
With the merged transformation spec CSS3 Transforms[1], you can use units like cm, in, px, pt and a lot more for translate(). But all units are relative to user units which means the same like Olaf mentions in his post.

> 
> Without providing a unit or an option to do so, you work in local units.
> Typically these are no pixels. Apart from other transformations,
> how much this is, depends mainly on the relation of width, height, viewBox
> and preserveAspectRatio especially on the root svg element.
> The simplest approach is anyway just to use only local units within the
> svg element and define width and height of the svg with the intended
> units.
> Whatever you assume, what a 'natural unit' is, as already discussed before,
> there are reasons, why you will typically get the absolute units like mm and
> cm not correctly displayed, if you use them ...
> 
> 
> Olaf
> 


Dirk

[1] http://dev.w3.org/csswg/css3-transforms/

Received on Saturday, 3 March 2012 15:22:15 UTC