David Avery wrote:
I'm trying to draw a selection box on top of an existing svg document
and I'm having trouble getting access to the graphic object to
presumably draw on. The larger goal is I'm trying to implement a mouse
drag select function for my application.
I suggest you look at the Overlay/Interactor stuff, in particular,
the AbstractZoomInteractor does almost exactly what you want (of
course it zooms at the end instead of selecting elements).
I got all the mouse listeners
and rect transforms sorted out I just cant get access to something to
draw on. I dont have to modify the DOM for the rect to draw because it
is temporary, all I want to do is find out what elements are in its
bounding box of the rect change some attributes of the elements and
remove the rect when they mouse up.
When the user is done (or during the drag I suppose), you
can use getIntersectionList to get the elements.
Any clues for the clueless?
When I get down to ;
SVGGraphics2D g = new SVGGraphics2D(document);
This really isn't what you want, if you want to add
a rectangle to the document you should just create a 'rect'
element, but the overlays will be more efficient in general.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]