Clarification of transforms?

   Larry Ewing and I have just implemented affine transforms in Gill,
and we have come to a point where we find the spec unclear.

   Let me use concrete examples:

<rect x="10" y="10" width="10" height="10" transform="scale(2)"
   style="stroke-width: 1"/>

I _think_ this is equivalent to:

<rect x="20" y="20" width="20" height="20" transform="scale(1)"
   style="stroke-width: 2"/>

but I'm not sure. I also think it's equivalent to:

<g transform="scale(2)">
 <rect x="10" y="10" width="10" height="10" style="stroke-width: 1"/>
</g>

but again I'm not sure.

Similarly, I think:

<rect x="10" y="-20" width="15" height="10" transform="rotate(90)"/>

is equivalent to:

<rect x="10" y="10" width="10" height="15"/>

   The CSIRO svg viewer seems to disagree with these assumptions.
Thus, we have some interoperability problems.

   I am imagining that a scale(2,1) stroked shape is not directly
equivalent to any unscaled one, because vertical lines will be twice
as thick as horizontal ones. The Gnome canvas does not presently
implement this functionality, but it is planned.

   Finally, using "12px" to specify pixel units seems not completely
well specified. If you have a scale(3,2) with "12px" type, is it
equivalent to a font size of "6" (i.e. text is stretched in the
horizontal direction), or does it somehow magically become
unstretched? When you consider skews and so on, the range of
possibilities would seem to expand even further, i.e. you have to
consider both the transformation of the baseline and also of each of
the glyphs.

   Thanks in advance for any clarification.

Raph

Received on Tuesday, 27 July 1999 15:44:42 UTC