Re: GdkBitmap



Hi,

I read it but didn't immediately see the inference (I've only been programming with Glib/Gtk for about 3 days am still getting used to thinking in object-oriented mode in Cand learning from the API reference manual). Your posts were definitely useful and appreciated. That definitely answered my question.

On a side note: I'm using the GdkBitmap in a call to gdk_window_shape_combine_mask() and am wondering if it was intentional that doing so would affect gdk_pointer_grab(). It seems that after using shape_combine_mask, changing a window's dimensions via gdk_window_resize() won't affect the limiting area that gdk_pointer_grab() uses. In my experiments, the pointer would still be limited to the area of the GdkBitmap regardless of what parameters are used in gdk_window_resize.

Thanks for all the help!

Sven Neumann wrote:

Hi,

Richard Plana <rplana zicorp com> writes:

Thanks and my apologies. I was looking at the wrong pages. That said,
I still couldn't find a way to arbitrarilly create a GdkBitmap from
scratch (ie. just specify a width and a height) and to modify its
pixel contents (set and unset pixels). All of the functions I've seen
which create GdkBitmaps require either an XBM or an XPM or an Imlib
supported image).

You didn't read what I wrote, did you? A GdkBitmap is a GdkPixmap is a
GdkDrawable. So in order to create a bitmap from scratch you use

 gdk_pixmap_new (width, height, 1);

There's also gdk_bitmap_create_from_data() which is probably a more
efficient way since it allows you to initialize the bitmap at the same
time.


Sven

--


*Richard Neal Plana, B.Sc., CCNA*
Lead Software Engineer
Zi Corp.



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