开发者

How to write contents of a Cairo Image surface into a Gdk Pixbuf?

开发者 https://www.devze.com 2023-01-27 09:08 出处:网络
I have a canvas(Gdk Drawing Area), which开发者_如何转开发 I can draw into it using Cairo, but I need to save contents of my canvas into a buffer which in my case is a Gdk Pixbuf. I want to know if it\

I have a canvas(Gdk Drawing Area), which开发者_如何转开发 I can draw into it using Cairo, but I need to save contents of my canvas into a buffer which in my case is a Gdk Pixbuf. I want to know if it's possible or not, if there is a better way I would like to know.

thanks.


We do this in f-spot using a simple copy routine. Not the most elegant solution, but it works:

http://git.gnome.org/browse/f-spot/tree/lib/libfspot/f-pixbuf-utils.c#n170

0

精彩评论

暂无评论...
验证码 换一张
取 消