W3C home > Mailing lists > Public > www-svg@w3.org > March 2012

Re: Transformations with units

From: Dirk Schulze <dschulze@adobe.com>
Date: Sat, 3 Mar 2012 07:21:50 -0800
To: "Dr. Olaf Hoffmann" <Dr.O.Hoffmann@gmx.de>
CC: "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <17B0B211-51C1-47A0-9C6F-623FD7640D94@adobe.com>

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


[1] http://dev.w3.org/csswg/css3-transforms/
Received on Saturday, 3 March 2012 15:22:15 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:27 UTC