[Gtk-sharp-list] How to make pixbuf from cairo surface
zeno490 at gmail.com
Sat Mar 31 18:05:18 UTC 2012
I'm not sure about drawing to a pixbuf but here is what I use to draw
to a pixmap:
private Cairo.Surface mCompositeSurface;
private Pixmap mCompositePixmap;
private void HandleDrawingAreaConfigureEvent(object o, ConfigureEventArgs args)
var lAllocation = mDrawingArea.Allocation;
mCompositePixmap = new Pixmap(args.Event.Window,
lAllocation.Width, lAllocation.Height, -1);
mCompositeSurface = new Cairo.ImageSurface(Cairo.Format.ARGB32,
// Draw to surface here
var lPixmapContext = CairoHelper.Create(mCompositePixmap);
lPixmapContext.SetSourceSurface(mCompositeSurface, 0, 0);
Hope this helps.
On Wed, Mar 28, 2012 at 9:12 PM, Dobromir Enchev <blez at abv.bg> wrote:
> I tried to find a way, but it seems that gdk_pixbuf_get_from_surface isn't
> ported to Gtk#.
> How can I accomplish this?
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
More information about the Gtk-sharp-list