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(..)

canvas.setSVGDocument(graph);

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

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

 if(canvas.getRenderingTransform() != null)
      at.concatenate(canvas.getRenderingTransform());
 c.setRenderingTransform(at);


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to