Re:Motion events in a DrawingArea



Hi Dan,

Try gtk_widget_add_events() to add your events before the widget is realized. Then you can set up your drawing area callbacks for your cursor motion.

I have a bit of a lengthy example in C at

https://github.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/cairo_drawings/bezier_points1.c

If you are working on some graphing there are a few things in there that might be of added interest. You can move some points around the drawing area and use a smoothing or approximation function to connect them. There is also some animation and svg in there as well.

Eric


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