[Mono-list] how do I place a cairo graphic in a treeview?

Adam Tauno Williams awilliam at whitemice.org
Wed Dec 24 09:24:39 EST 2008


On Wed, 2008-12-24 at 05:02 -0800, alanb wrote:
> I have a treeview and I want to store dynamically generated images in one of
> its columns.  Reading the treeview tutorial I see that I need my image as a
> pixbuf. I am drawing the images using Cairo, all I can see in the
> imagesurface  API is to save as a png file directly with no access to its
> underlying stream which I could use. So how can I convert a Cairo image to a
> pixbuf?
> If I use a Gdk.pixmap instead and draw to it, again how do I convert it to a
> pixbuf?

The Gtk-sharp <http://lists.ximian.com/mailman/listinfo/gtk-sharp-list>
is probably a better (or at least more specific) place to ask.  Off the
top of my head writing it to a PNG and creating a pixbuff from that is
the only way I can think of.



More information about the Mono-list mailing list