Hi Mistercaste,

mistercaste <[email protected]> wrote on 12/02/2009 06:48:10 AM:

> I tried the following code (a bit.. uh.. randomly), but it
> doesn't seem to work.
> I don't know how to relate the bounds with the rendering
> transform.

   If you are going to be doing any significant work with
SVG and/or Batik I strongly recommend that you learn to
work with Affine Transforms.  This is a general concept
in 2D graphics and understanding them is essential to 
doing anything non-trivial.

> 
>     private Rectangle getAOI() {
>         AffineTransform rt = canvas.getRenderingTransform();
>         Rectangle myRect = canvas.getBounds();

            try {
                rt = rt.createInverse();  // we want to go 
screen->document
                myRect = rt.createTransformedShape(myRect).getBounds();
            } catch (NoninvertibleTransformException) {
                /// nothing to do
            }
> 
>         return myRect;
>     }
> -- 
> View this message in context: http://old.nabble.com/PDF-Transcoder-
> Zoom-tp26593852p26607629.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

Reply via email to