Kouhei Sutou
11/16/2006 3:17:00 AM
Hi,
2006/11/16, Marc Heiler <shevegen@linuxmail.org>:
> Specifically, I would like to make a "dumb" Image "drawing"
> application, and would like to be able to store the final
> image result somewhere. (Think of some flash
> applications that do that)
You can do with Gdk::Drawable and Gdk::Pixbuf.
The following example snapshots your desktop.
require 'gtk2'
drawable = Gdk::Window.default_root_window
pixbuf = Gdk::Pixbuf.from_drawable(drawable.colormap, drawable, 0, 0,
*drawable.size)
pixbuf.save("x.png", "png")
Thanks,
--
kou