Python+GTK+libchamplain: how to draw real-time on the champalin canvas ?



Hello.

This is on Gentoo Linux, with Python 2.7, Gtk+3 and libchamplain 0.12
(Champlain objects are Clutter actors)

I am writing a small app for displaying GPS files. The top of my app
window contains a Gtk.DrawingArea that displaying speed as a function
of time.

Below this area, I have embedded a libchamplain map that displays the
GPS track. I have alos aded markers for the start and end of the
track.

Now I'd like to place a marker on the map, according to the point I
click on the DrawingArea graph (that is, from this drawing I get the
time, hence the latitude and longitude, so I can place the marker on
the map).

I have tried everything I could think of (retrieving the Cairo canvas
of the champlain map to draw directly on it, placing the marker
directly through the champlain API, getting the stage on which the map
is drawn to place a new actor, ...) but it didn't work.

Is it because I run my app with Gtk.main() and not Clutter.main()? Do
I have to run both main loops? Do I have to use threads to
concurrently run them? Or is there an obvious solution I missed?

Thanks for any help!

F. Delente


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]