Re: [gtk-list] Re: Shaped Pixmaps

> style = gtk_widget_get_default_style();
> pdata = gdk_pixmap_create_from_xpm(draw->window, &mask,
>&style->bg[GTK_STATE_NORMAL], xpm_file);
>    gdk_window_shape_combine_mask(pdata, mask, 0, 0);

Sorry, I wasn't very clear about this; actually, I was misleading
although the code wasn't. You want:

    gdk_window_shape_combine_mask(draw->window, mask, 0, 0);

If you look at the code I sent, the shaped window is the window in
which the pixmap will be drawn. You have to basically shape the window,
then draw the pixmap, not shape the pixmap (the mask sort of takes
care of this already).

Its possible to shape some other window, too. My code has the
provision to set the window that should be shaped, in case the pixmap
is added to a widget that doesn't have its own window.


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