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

Re: Transformations with units

From: Rik Cabanier <cabanier@gmail.com>
Date: Sat, 3 Mar 2012 10:48:24 -0800
Message-ID: <CAGN7qDCoU5wwaGMLE31GEr0zfqRP55Bgw1XVqRFqdWSy4U__Ow@mail.gmail.com>
To: Dirk Schulze <dschulze@adobe.com>
Cc: "Dr. Olaf Hoffmann" <Dr.O.Hoffmann@gmx.de>, "www-svg@w3.org" <www-svg@w3.org>
On Sat, Mar 3, 2012 at 7:21 AM, Dirk Schulze <dschulze@adobe.com> wrote:

>
> 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.
>

Can you use unitl if you express the transform with 'style: transform(...)'
or also directly with the transform attribute?


>
> >
> > 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 18:48:53 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:50 GMT