Creating non-window GC




  I have, basically:


  GdkBitmap *newmask., *xpmmask;
  GdkGc *bmp_gc;

  newmask = gdk_image_new_bitmap( visual, zerodata, w, h );
  bmp_gc  = gdk_gc_new((GdkWindow *)newmask);
  gdk_draw_image(
    (GdkWindow *)newmask, bmp_gc, xpmmask, 0,0, 0,0, w,h );


  ... in order to copy a bitmap mask.

a) is there another/better way of doing this? Because, 

b) It dumps core due to gdk_gc_new insisting that it's arg. is a GdkWindow
(not any drawable), and this object's private type has xdisplay in a
different location to GdkBitmap's private, so one /can't/ cast from bmp to
win. If the above is done, an erroneous xdisplay is extracted and
XCreateGC() crashes.

-- 
=====================- http://www.racaldefence.com/ -===================
 Neil Bird                   |   This is who we are     The time is near
                             |
 mailto:neil.bird@rdel.co.uk |        There are 68 days remaining



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