Yeah, this is kind of interesting. I never dived into the overlay; I hadn't even heard of it until these posts. I certainly haven't had any issues with the glass pane, save the transformations that need to be applied. Part of my problem there is that I don't full understand AffineTransforms.
Michael Bishop -----Original Message----- From: Scott A. Ruffner [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 30, 2005 11:19 AM To: [email protected] Subject: Re: Element -> Bounding Box? Tonny Kohar wrote: > IMHO, JSVGCanvas canvas overlay is an alternative options to draw this > kind of stuff. You could draw your "ghosted line" or "outline" in the > overlay. See the zoom part of overlay in squigle you could press, hold, > drag mouse to draw rectangle. > And the good thing about overlay, that it is matched coord with > JSVGCanvas, no more +x +y for JMenuBar and JToolbar. > > For Element Bounding Box, you could get by > gvtNode.getBounds() // check the API syntax for param and return values > or > svgDomNode.getBBox() // check the API syntax for param and return values > > Best Regards > Tonny Kohar yes, that's the way we do dynamic element move/resize operations in our graphing app, and it works fairly well. i started by looking at the Batik class AbstractZoomInteractor and developed my own move/resize interactor based on that. the interactor uses an Overlay to provide visual feedback as the mouse moves. that said, i'd be interested if anyone thinks the glass-pane approach is faster... -- Scott A. Ruffner, Scientific Programmer/Analyst Lisberger Lab W.M. Keck Foundation Center for Integrative Neuroscience University of California -- San Francisco 513 Parnassus Avenue, Box 0444, S871 San Francisco, CA 94143-0444 415-502-7897 --------------------------------------------------------------------- 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]
