[Gtk-sharp-list] Cairo to Pixbuf

Mike Kestner mkestner at gmail.com
Mon Jul 25 21:36:13 EDT 2011

On Mon, Jul 25, 2011 at 6:04 PM, chewyraver <all_wagga at hotmail.com> wrote:

> Hi Nicholas,
> Yes, Cairo isn't the fastest, but it's good enough I think. I cannot find
> anything to teach me what I want, if you know of any sources, please share!
> :)

There is a cairo sample in the gtk-sharp module that shows how to draw to a
surface and then paint it to the context.  You don't need a pixbuf to do
that, unless you want some of the additional persistence stuff provided by
the pixbuf API.  Here's a link to the sample in master:


The cairo stuff is the same using 2.12, but you override the OnExpose VM
instead of OnDrawn, and you need to use Gdk.CairoHelper to get a cairo
context for the Gdk.Window.  The 2.12 version is in the sample place on

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20110725/17633cb6/attachment-0001.html 

More information about the Gtk-sharp-list mailing list