Bibek Sahu wrote:

Howdy all,

I'm a bit stuck on some SVG graphics transforms (using Batik, but this is
probably more general than Batik); is this the appropriate forum for it, or
should I be checking elsewhere?  [if elsewhere, would you be so kind as to
provide some suggestions? :-)]

I don't mind questions on SVG too much in this list, but another good forum is the 'svg-developers' forum in yahoo-groups. This sort of question is asked all the time there.

At this point, to the /user/, this looks like a arbitrary polygon. However, to the program it's still a rect (or a circle, or group, or whatever).
So suppose that the user now stretches this "polygon" along the X-axis, not touching the Y [scale(2.0, 1.0)]. What /kind/ of transform is required to make this work _in
general_? (the reason I need this to work /in general/ is because the item may be
a group which already has an arbitrary set of transforms applied).



_/\_ _/ \_ / \_ <rect x="10" y="20" width="5" height="3" transform="....???.... rotate(12, 12.5, 21.5) ....???...."> \_ \_ \_ \ \_ _/ \_ _/ \/



I tried pre-concatenating a translate, then concatenating the scale, the concatenating another translate, but this only seems to work correctly if no prior transforms are there. Perhaps I just did something wrong, but if so, what?

You need to preconcatenate everything:


transform="translate(12.5, 21.5) scale(2,1) translate(-12.5, -21.5) ..."






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to