Brian Johnson wrote:
I'm new to Batik and naive in Java, though experienced in older
languages and graphics environments. I have a student who is working to
combine various technologies into a Java application--including SVG
files and sketch recognition. The basic strategy is to load an
externally generated SVG file which has associated style ID's with <g>
elements, display this graphpic, allow the user to sketch marks on top
of the SVG, categorize the sketch gesture, identify what was "under" the
sketch, and then produce a folllow-up action. We're now at the point
where we need to identify the element. We know where (in terms of the
overlayed Java Graphics world) the centroid of the sketch was and want
to query the SVG for the ID of the nearest element "under" this sketch.
You can use the org.w3c.dom.events.EventTarget and
org.w3c.dom.events.MouseEvent classes to detect mouse over,
mouse click, etc. events by registering the appropriate
listener(s). Pretty much any SVGElement in the DOM can be
cast to an EventTarget.
-Archie
__________________________________________________________________________
Archie Cobbs * CTO, Awarix * http://www.awarix.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]