GdkBitmap from black & white .png file



The Gdk functions to create bitmaps from data require xbm or xpm data. 
(For example gdk_bitmap_create_from_data ()). Why do I not see anything
to create a bitmap from a (b&w) .png image?
I've used the pixbuf library before, using gdk_draw_pixbuf() but the
program I am working on uses  a GdkBitmap * mask to draw in the
following fashion:

  gdk_gc_set_clip_mask (gc, mask);
  gdk_gc_set_clip_origin (gc, x, y);
  gdk_draw_rectangle (pixmap, gc, TRUE, x, y, width, height);
  gdk_gc_set_clip_mask (gc, NULL);      /* Removes clip mask */

I don't understand the issues here; I want the application to let the
user select a (small) rectangular area in the .png image for use in as
the GdkBitmap *mask in the above code.

Anyone with a wider view on this stuff? Help would be much appreciated!

Richard Shann





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