Hi Emzic,

emzic <[EMAIL PROTECTED]> wrote on 07/16/2008 06:53:17 AM:

> thomas.deweese wrote:
> > 
> >    In the e-mail thread with Hardc0d3r I showed how to find the 
element 
> > at a particular point that should be the targetElement (read the 
thread 
> > starting with my first response):
> > 
> > http://www.nabble.com/getting-the-element-in-svg-from-an-overlay-
> to18301441.html
> > 
> > 
> thanks a lot for your help.
> 
> i read that article and studied the code, but it seems as if it requires
> some JSVGCanvas where the svg is drawn in order to call the function
> 
> canvas.getGraphicsNode().nodeHitAt(gnp);

   Well this is just a way to get the root graphics node (root of the
GVT tree) associated with the Canvas.  This is the same root graphics 
node that you must have created to rasterize the document.

> my specific situation is, that i dont have a canvas, but just a readily
> rasterized bufferedimage as i said above. (the reason for this is, that 
the
> image is actually used as an openGL texture.) still i would like to get 
the
> element that is below the mousecursor.

   If you were using the Transcoders to generate your buffered image then
you will need to either subclass or 'copy and paste' the transcoder
code so you can hold onto the BridgeContext and GVT tree.  Without the
GVT tree you can't do anything that relies on geometry (like figuring out 
what element is under a particular point), and the BridgeContext allows 
you
to map between the GVT tree and the DOM tree.

Reply via email to