Re: [gtk-list] Re: Shaped Pixmaps



Paul Barton-Davis wrote:

> In message <373AC3D4.FF34A48C@ceselsa.es>you write:
> >I have a GtkPixmap (derived from GtkMisc, it isn't?) and I want to Shape it,
> >but it hasn't a GdkWindow.
>
> a *GdkPixmap* *is* a window. whatever you do to a GdkWindow,
> you can do to a GdkPixmap.
>

This code does not work (program dumps a core) :


 GdkBitmap *mask = NULL;
 GdkPixmap *pdata = NULL;
 GtkStyle *style;

 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);

 pixm = gtk_pixmap_new(pdata, mask);



>
> >It is possible to apply the Shape (gtk_widget_shape_combine_mask()) to the
> >GtkMisc's GdkWindow ?
>
> you don't need a GtkMisc, just use the pixmap itself.
>
> >    The idea is to put a lot of shaped pixmaps in a GtkFixed but without  a
> >GtkFixed (or GtkEvent... or similar) for each pixmap.

... a lot of pixmaps at the same time, in distinct positions and in the same
fixed ...




Thank you very much, Paul



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