xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <David.Sm...@aeroint.com>
Subject Immediate translation of object
Date Wed, 12 Dec 2001 16:15:13 GMT
I have a graph making tool in batik and am trying to center the created
graph on the JSVGCanvas
by applying a translate function.  However I cannot get it to work.

My code is similar to:

SVGDocument graph = GraphBuilder.createGraph(..)


// calculate translation co-ordinates, x and y..

AffineTransform at = new AffineTransform()
at.translate(x,y);  // translate to the correct position

 if(canvas.getRenderingTransform() != null)

This has no effect at all on the graph, though if I call the same transform
function from a menu item once the
graph is loaded, it works fine.
Does anyone have any idea?  Is there a better way of performing the
translation (eg setting an x/y offset on the canvas)?

This Internet E-mail is intended solely for the person to whom it is addressed. It may contain
confidential or privileged information. If you have received it in error please notify us
immediately by telephone and destroy the transmission. You must not copy, distribute or take
any action in reliance on it.

Aerosystems International               Phone: +44 (0)1935 443000
                                        Fax  : +44 (0)1935 443111
                                        Web  : www.aeroint.com

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message