Thanks Kai!! It will help me a lot!

Best regards

Danilo


On Fri, 14 Jan 2005 08:58:57 +0100, Meves Kai (ext)
<[EMAIL PROTECTED]> wrote:
> Hello,
> 
> >  2 - How do the coords in AffineTransform, returned by
> > "svgCanvas.getViewBoxTransform()",   work?
> >  Neither the screens corrds nor the canvas corrds worked appropriately
> > when I tried to use translation operations.
> >
> > 3 - Are there some way to map canvas coords to screen coords
> > and vice-versa?
> 
> Yes, of course there is. What you get by calling getViewBoxTransform() is
> the current Transformation Matrix, Batik uses to do the Transformation from
> world coordinates to screen coordinates. You can do something like this:
> 
> AffineTransform affTrans = myCanvas.getViewBoxTransform();
> affTrans.transform(point1,point2) //where point1 and point2 are some Point2D
> 
> and you get the screen coordinates from the world coordinates that are
> stored in point1 as result in point2.
> 
> If you want to do it the other way round (screen coordinates to world
> coordinates), you need to use the inverse of the Transform Matrix, which you
> get by
> 
> affTransInv = affTrans.createInverse();
> 
> I hope that I remembered all of this correctly... :-)
> 
> Kind regards,
> Kai.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"...YOU CANNOT KNOW THE MEANING OF YOUR LIFE UNTIL YOU ARE CONNECTED
WITH THE POWER THAT CREATED YOU..."
Shri Mataji Nirmala Devi

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

Reply via email to