go-gtk
go-gtk copied to clipboard
Pixbuf no method "get_from_drawable"
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?
Currently, not yet. I will do it in later. But AFAIK, most of cases, drawingarea is drawn from pixbuf or pixmap.