On 08-Sep-2014 11:00, Johan Engelen wrote:
If document-units says "mm", then that is what that is: stuff is expressed in mm.
Only in the simplest possible case.
1. new document, set to mm 2. draw a 10mm x 10mm rectangle. 3. duplicate it. 4. group the two rectangles. 5. scale the group upwards a bit.
The resulting SVG looks like this (only one rectangle shown, style omitted)
<g id="g3337"
transform="matrix(2.3274107,0,0,2.3475402,-21.407125,-174.42731)"> <rect y="117.18413" x="16.12698" height="10" width="10" id="rect3320" />
The object has height "10", but it isn't 10mm, it is 23.475mm. My point being that the only time x,y,height,width in even this simple example are all in the units specified for the drawing is if no transforms are applied above it. The general case is that the final value must incorporate all transforms. It seems like a total waste of effort (to me) to use anything other than pixels for the "internal" representation, with a final scale transform at the top to set the document units. Moreover, doing it that way doesn't break anything (that isn't already broken because it fails to check all transforms.) For instance, it doesn't break clipping. The current method does break things and fixing it would require even more complexity, by converting the defs as well.
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech