I don't know whether this will be of any help, but consider the following: - You draw on an infinite drawing board - The viewBox attribute on the SVG element describes the part of the drawing board you want to see - the height and width attributes describe how big you want the image to be
Surely, setting appropriate values (according the zoomed area, and the output image size) is enough? Martin 2009/12/2 mistercaste <[email protected]>: > > 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. > > private Rectangle getAOI() { > AffineTransform rt = canvas.getRenderingTransform(); > double x = rt.getTranslateX(); > double y = rt.getTranslateY(); > double scaleX = rt.getScaleX(); > double scaleY = rt.getScaleY(); > > Rectangle myRect = canvas.getBounds(); > > myRect.setRect( > cb.x * x,// X > cb.y * y,// Y > cb.width * scaleX,// Width > cb.height * scaleY);// Height > > 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] > > -- >From my MacBook Pro --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
