Hi Sudhakar,
Sudhakar S <yessudhakar@hotmail.com> wrote on 06/17/2006 01:50:45 AM:
> I am applying transform for group element only. While moving it is
> repositioning all the child elements without any problem. But problem
is, it
> doesn't move the selected group elements along with mouse move.
>
> SVGPoint pt = localPt((Element)selElement.getParentNode(),
> elEvt.getClientX(), elEvt.getClientY());
> float dx = currentX - startPt.getX();
> float dy = currentY - startPt.getY();
>
> Actually i am using the same dx and dy value for all the selected group
> elements to perform transform. I think this may be a problem. If this is
a
> problem, how to calculate dx and dy value for remaining selected group
> elements.
You need to do the above for every group you want to apply the
move to. The tricky bit being that you need to start point for
each group. Probably it's best to remember the start point as it
came out of the event and then for each group call 'localPt'
with both the start and current points for each update.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
|