Thank you Thomas
Just to clarify.. does this mean i need to place my canvas inside a
JSVGViewerFrame?
No, it's just that the JSVGViewerFrame behaves like you want. If you look at it's implementation you will see that it creates a subclass of JSVGCanvas and overrides several of the methods in particular the 'setMySize' method.
something like JSVGViewerFrame.pack(); after i have loaded my document?
This would mostly work, but doing the pack in setMySize will ensure that it get called at the appropriate times (avoiding double renderings etc).
Thanks again... Danny.
----- Original Message ----- From: "Thomas DeWeese" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 10, 2004 12:27 PM
Subject: Re: aligning images on the JSVGCanvas
Danny Browne wrote:
All images i display on the JSVGCanvas are being displayed in the center
of
the canvas thus giving problems when calculating x and y coords of
elements
to be added. any one any idea on how to Pack the canvas or set the image
to
the top-left hand corner of the canvas? my canvas is placed inside a JInternalFrame which is inturn inside a JTabbedFrame. Does this make
any
difference?
If I understand correctly, this is normally done by subclassing the JSVGCanvas and overriding the 'setMySize' method to call 'pack()' you can look at the implementation of batik.apps.svgbrowser.JSVGViewFrame to see how this is done for squiggle.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]