Re: masking a window - having a window with transparent borders?



Paul Davis wrote:
I'm trying to create a custom window, what would have rounded edges. to


   [ ... ]

this is old (gtk--) code, but it worked. there is a little more
infrastructure required to actually use this code, but you'll get the
idea. a "Pix" is just a collection of pixmaps/bitmaps.

thanks for the sample. first, I had some difficulty generating the masks from my Gdk::Pixbuf's, but I found the following call:

Gdk::Pixbuf::render_pixmap_and_mask()

I hope this is the proper way to create those masks.


but, then calling Gtk::Window::shape_combine_mask() with the appropriate mask has the strange effect, that it does not combine masks with each subsequent call, but actually replaces the mask of the window with the bitmap supplied at the last call to shape_combine_mask().

is this the intended behaviour? or maybe I'm doing something wrong?

if this is the intended behaviour, then the name of the function (combine_mask) is quite misleading. also, I understand that then I should combine the masks for my images into a single bitmap, and call shape_combine_mask() with that one bitmap. how do I combine multiple bitmaps?


Akos



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