Re: How to dump a gnome canvas in a file ?
- From: Alexandru Csete <alexc phys au dk>
- To: Le Roux Yannick <lerouxy thmulti com>
- Cc: "'gnome-devel-list gnome org'" <gnome-devel-list gnome org>
- Subject: Re: How to dump a gnome canvas in a file ?
- Date: 28 Aug 2002 21:46:46 +0200
If you use Gnome 1.2 or 1.4, you can use GdkImlib to grab and save the
contents of any widget that has it's own window:
GdkImlibImage *img =
gdk_imlib_create_image_from_drawable(canvas->window,NULL,0,0,width,height);
gdk_imlib_save_image(image, filename, info);
In Gnome 2 you can do the same using the gdk-pixbuf library (I did not
try this, but I've seen it in the API reference).
You should be aware of that these functions make a 'real' screenshot,
meaning that if part of your canvas is covered by another window it will
be included in the resulting image.
Alex
On Wed, 2002-08-28 at 17:17, Le Roux Yannick wrote:
>
> I have developed a software that uses a gnome canvas to display graphical
> objects.
> I would like to supply the users with a mean to perform screenshots
> of the canvas and only of the canvas (i.e excluding other widgets of the
> root window).
>
>
> How could I implement this feature.
> _______________________________________________
> gnome-devel-list mailing list
> gnome-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-devel-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]