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
moderator!

Thanks again!

Raj

-----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
*gdk_pixmap_foreign_new()
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
bad
drawable error. Is there something I'm overlooking? (I'm figuring the
likely
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.

Havoc

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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