Vincent Hardy wrote:
> Thomas E Deweese wrote:
> >
> > [...]
> > I'm guessing it is done so people can read the result. I can
> > make a lot more sense out of:
> >
> > transform="rotate(45), scale(0.5)"
> >
> > As opposed to:
> > transform="matrix(0.35, 0.35, -0.35, 0.35, 0, 0)"
> >
> > (or what ever the correct result is...)
> >
> > This might be something that could be control by a hint, or the
> > like. Perhaps the TransformStack could re-decompose a matrix
> > transform into a scale, rotate, translate (when shear is not
> > involved)...
>
> Thomas is right, this was done so that the svg is more readable
> [...]
> However, I agree that if you keep modifying the transform you
> end up with a long transform string which no longer makes sense...
> In addition to what Thomas suggests, you could also put a limit on
> the number of entries in the transform stack: beyond that limit,
> the stack is collapsed and the matrix notation could be used...
>
> Vincent.
Okay. Thank you for that clarification and suggestion. The problem currently
is that I get long transform strings in *matrix* notation, e.g.:
transform="matrix(0.35, 0.35, -0.35, 0.35, 0, 0)
matrix(0.34222222222235, 3.35, 345, 345, 0, 0) matrix(123, 13.5, 0.1,
0.21232023123, 45, 43) matrix(0.132496565, 0.2434954850345, 5675, 5757, 0.1,
0.1) matrix(354.345345, 123.45678, 354.3544, 354.23243, 0, 0)"
because there is no code to collapse matrices. This is even less readable
than the one Thomas offered. My first approach would be to add matrix
multiplication to TransformStackElement.concatenate(), so as to get rid of
the pathological cases like above. Then later stuff could be added to
decompose where possible and useful.
Another approach would be to avoid stacks of matrices like that being
generated in the first place, but I don't know if this can be done well. In
my image caching code at least it would mean some loss of generality.
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]