[Gtk-sharp-list] Creating a pixmap from a widget for window masking

David Siegel djsiegel at gmail.com
Mon Oct 8 16:40:17 EDT 2007


I am using a custom Gtk.Window subclass that has no decoration, and relies
on a custom Gtk.Bin subclass called RoundedFrame for the window's
presentation. The RoundedFrame, as you may have guessed, draws itself as a
rounded rectangle using a Cairo.Context created with (this refers to an
instance of RoundedFrame):

    Gdk.CairoHelper.Create (this.GdkWindow)

On non-composited screens, my rounded rectangle is drawn with black corners,
so I need to call:

    my_rounded_window.ShapeCombineMask (Pixmap mask, int width, int height,
int x_offset, int y_offset)

to mask the shape of the window so it is drawn as a rounded rectangle.

My question is, is there any way to get the correctly-shaped Pixmap from the
RoundedFrame child of the window so I can mask the window with it? I've been
searching and searching through API documentation with no luck.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20071008/c53cf2fd/attachment-0001.html 


More information about the Gtk-sharp-list mailing list