You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Urs Reupke <ur...@gmx.net> on 2006/05/05 18:19:30 UTC

Custom cursors: SVG or Swing (inspired by: Custom Cursor Problems)

Hi,
reading the recent messages about custom cursors made me thinking.
I didn't know customizing the cursors for SVG elements was so simple,
up to now I did everything concerning cursors using Swing.
In case you're wondering, I had to extend and override the 
cursor-methods in the SVGCanvas.

My system is running fine, but I was wondering if the SVG way might be 
more performant or maybe even simpler to implement.

Right now, I am listening for mouse move events on the cursor, check 
whether the cursor is inside an element's bounding box, and if it is, 
replace the standard arrow cursor by one of two custom cursors, 
depending on state of the model represented by the element in the SVG.

If done by SVG, I would save the time to calculate the bounding box, 
however, I'd have to manipulate the document whenever the underlying 
model changes.

Considering the possible trouble involved, is it worth changing?

Regards
-Urs

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org