RE: Saving a GdkDrawable/GdkPixmap to a picture file

Thank you all. I got it working.

Alos, let me apologize for the multi-posting. My company decided to change
my email address mid-day yesterday, and suddenly my posts had to go to the

Thanks again!


-----Original Message-----
From: Havoc Pennington [mailto:hp redhat com]
Sent: Thursday, April 26, 2001 12:03 PM
To: Wolfgang Sourdeau
Cc: 'gtk-app-devel-list gnome org'
Subject: Re: Saving a GdkDrawable/GdkPixmap to a picture file

Wolfgang Sourdeau <wolfgang contre com> writes:
"Tanikella," == Tanikella, Rajanikanth
<Rajanikanth Tanikella scr siemens com> writes:

Thanks. The gkd/gtkx.h helped with the display, but I still don't see
how to
get an X Pixmap from a GdkPixmap. I see GdkPixmap
to go from X Pixmap to GdkPixmap, but I'd like to go the other way so
that I
can use XpmWriteFileFromPixmap() to write it. Using a GdkPixmap causes a
drawable error. Is there something I'm overlooking? (I'm figuring the
answer is 'yes.')

Including gdk/gdkprivate.h (which is evil) you can cast your GdkPixmap* to
a GdkWindowPrivate *. And then access its xwindow member.
It should work.

Use the macros in gdkx.h instead of accessing the struct directly, and
your code will continue to work with GTK 2.


gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

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