go-gtk icon indicating copy to clipboard operation
go-gtk copied to clipboard

Pixbuf no method "get_from_drawable"

Open Vakhrushev opened this issue 8 years ago • 1 comments

Help please with save Drawable into file.

get drawable

pixmap = gdk.NewPixmap(drawingarea.GetWindow().GetDrawable(), allocation.Width, allocation.Height, 16)
gc = gdk.NewGC(pixmap.GetDrawable())

add image from pixbuf

pixmap.GetDrawable().DrawPixbuf(gc, pixbuf, 0, 0, 0, 0, defWidth, defHeight, gdk.RGB_DITHER_NONE, 0, 0)

how to save pixmap to file?

Vakhrushev avatar Jan 06 '17 21:01 Vakhrushev

Currently, not yet. I will do it in later. But AFAIK, most of cases, drawingarea is drawn from pixbuf or pixmap.

mattn avatar Jan 07 '17 13:01 mattn