Re: goocanvas vs crcanvas,which better?

2009-03-26 Thread Dov Grobgeld
The following does it: int img_width = gdk_pixbuf_get_width(pixbuf); int img_height = gdk_pixbuf_get_height(pixbuf); cairo_surface_t *surface = cairo_image_surface_create_for_data(gdk_pixbuf_get_pixels(pixbuf), CAIRO_FORMAT_ARGB32,

Re: cairo context for pixbuf

2009-03-26 Thread Pavel A. da Mek
- Original Message - Subject: Re: goocanvas vs crcanvas,which better? Is there standard facility for creating cairo context for pixbuf? Like gdk_cairo_create() for drawables. pixels = gdk_pixbuf_get_pixels (pixbuf); width = gdk_pixbuf_get_width (pixbuf); height = gdk_pixbuf_get_heigh

Re: goocanvas vs crcanvas,which better?

2009-03-26 Thread Alexander
Hi, Dov. On Thursday 26 March 2009, Dov Grobgeld wrote: >- If the annotation is static, it certainly faster to prepare a >transparent pixbuf and draw the annotation on the pixbuf and then simply >merge the data from the frame grabber with the overlay mostly transparent >pixbuf, an

Re: Ho to implement new GSource?

2009-03-26 Thread Chris Vine
On Thu, 26 Mar 2009 12:17:17 +0100 Tomasz Jankowski wrote: > > Hello! > > I'm working on MT application, which perform some tasks in separated > threads. My application also use GTK+ and it should work on Windows, > so I need to deal somehow with running all functions, which change > GUI from o

Re: goocanvas vs crcanvas,which better?

2009-03-26 Thread Dov Grobgeld
Hi Chen, For the application that you described, using a canvas doesn't give you much and you can just as well create a cairo context and draw on the image directly. But there are a few things that you should be aware of: - Drawing overlays on av full realtime speed is going to take a lot of

Ho to implement new GSource?

2009-03-26 Thread Tomasz Jankowski
Hello! I'm working on MT application, which perform some tasks in separated threads. My application also use GTK+ and it should work on Windows, so I need to deal somehow with running all functions, which change GUI from one thread. I run one thread with GTK's main loop and i want to implement ne