Binding mouse events on SVG shapes in C,python or Java...

M

Mathieu Leplatre

I would like to implement a SVG canvas in which mouse events on shapes
can be handled by my program (C, python or Java...). On events, I want
to manipulate the shapes (changing color, stroke, position, size...).

Why ?
- Events on complex vectorial shapes (like countries or regions in a
map) are impossible to implement with a coordinates system
- I could design the elements of my small application/game with a SVG
editor (nice gradients etc.)

I would need :
- a SVG rendering lib (librsvg, Cairo,...)
- a SVG DOM API to manipulate shapes
- a simple SVG event system to bind mouse events to pieces of code in
C,python or Java...


I know you could easily do it with Javascript/emacs scripts within a
browser.

Some guyz recommended to look at WebKit or Gecko, but I don't like
including such a big engine for a small app.
I heard that a Cairo team was working on a SVG DOM API, and that
Inkscape were not ready yet to refactor their core into a events/DOM
library.

Where do you recommend me to start ?
Is there a magic component or workaround ?

Thank you all, hope I am not asking too much.
Mat.
 
P

Pavel Lepin

Mathieu Leplatre said:
I would like to implement a SVG canvas in which mouse
events on shapes can be handled by my program (C, python
or Java...). On events, I want to manipulate the shapes
(changing color, stroke, position, size...).

I suspect you would have better chances of getting a useful
answer on one of the groups in comp.graphics or
comp.programming hierarchies; or on one of the groups about
your PL of choice.

As I see it, this is reasonably on-topic here, it's just
that you're a bit unlikely to run into a person who would
be able to help you with your very specific problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,246
Members
46,840
Latest member
BrendanG78

Latest Threads

Top