/* Jeffrin Jose Licensed GPL v3 Copyright August 2010 GPL –> http://www.gnu.org/copyleft/gpl.html */ #include #include #include #include //the global pixmap that will serve as our buffer static GdkPixmap *pixmap = NULL; gboolean on_window_configure_event(GtkWidget * da, GdkEventConfigure * event, gpointer user_data){ static int oldw = 0; static int oldh = 0; //make our selves a properly …
Tag Archives: lens
cairo graphics 0.9 intersection II
/* Jeffrin Jose Licensed GPL v3 Copyright August 2010 GPL –> http://www.gnu.org/copyleft/gpl.html */ // module do_draw //do_draw will be executed in a separate thread whenever we would like to update //our animation void *do_draw(void *ptr){ currently_drawing = 1; int width, height; gdk_threads_enter(); gdk_drawable_get_size(pixmap, &width, &height); gdk_threads_leave(); //create a gtk-independant surface to draw on cairo_surface_t *cst …