Re: Transformations with units

Hi Dirk,

maybe I wasn't specific enough.
Will you be able to do:
<svg>
   ...
   <g transform="translate(100px 100px)">
   ...

or are those still unitless?

Rik


On Sat, Mar 3, 2012 at 11:21 AM, Dirk Schulze <dschulze@adobe.com> wrote:

>
>
> On Mar 3, 2012, at 10:48 AM, "Rik Cabanier" <cabanier@gmail.com> wrote:
>
>
>
> 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?
>
> Read section "The SVG 'attribute'" in the previous linked spec. The
> transform attribute will turn into a presentation attribute. Therefore you
> will be able to set the CSS transform by the SVG attribute as well. For
> backward compatibility the attribute will merge the parsing rules of SVG
> and CSS and will also support transformation functions of both, CSS3
> Transforms and SVG.
>
> Beside the transform attribute new presentation attributes will be
> introduced that match the new properties in the CSS3 Transforms
> specification like 'transform-origin'.
>
> Dirk
>
>
>
>
>>
>> >
>> > 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 19:42:33 UTC