Re: Saving a GdkDrawable/GdkPixmap to a picture file

"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.


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