Re: [gnomemm] Export Gnome::Canvas to image file (png, jpg, gif, ...)



I use:

Glib::RefPtr<Gdk::Drawable> window=canvas->get_window()

Glib::RefPtr<Gdk::Pixbuf> 
pixbuf=Gdk::Pixbuf::create(window,window->get_colormap(),0,0,0,0,500,500);
// The numbers are related with the size of the window, please see the
docs

//Then save the pixbuf
pixbuf->save(filename,"png");

canvas is of type Gnome::Canvas



El vie, 28-11-2003 a las 13:27, Manuel Martínez escribió:
> Hello.
> 
>     I'm using Gnome::Canvas to generate a group of pretty graphics.
>     Is there any way to export the content of the Gnome::Canvas to an 
> image file  (png, jpg, gif, ...)?
> 
> Thank you.
> 
> 
> _______________________________________________
> gnomemm-list mailing list
> gnomemm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnomemm-list
-- 
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
                 Sergio Pascual Ramírez       spr astrax fis ucm es
               Tf: (+34)  91-394-50-18      Fax: (+34)  91-394-46-35
                      Dept. Astrofíica Facultad de C.C. Fíicas
                          Universidad Complutense de Madrid
                                 28040 Madrid (Spain)

------------------------------------------------------------------------------
        - Yo tambié quiero una Europa libre de Patentes de Software -
        --------------------------------------------------------------
        EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es
        --------------------------------------------------------------

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]