Re: Transparent Pixbufs



On Wed, 2003-03-05 at 17:57, Owen Taylor wrote: 
> gdk_draw_rgb_image_dithalign doesn't support transparency.
> 
> Use gdk_draw_pixbuf() instead (GTK+-2.0 called this by the more
> cumbersome name gdk_pixbuf_render_to_drawable(), if you are
> using GTK+-1.2, you are out of luck.)
Thanks, yeah, I should probably have said - GTK 2. Did that and it works
like a charm.
Now, the next bit. I want to mask out the window so that all that's
visible is what I've drawn. I've done this using a "Full Wheelbarrow"
example but that one uses pixmaps, not pixbufs. I found something
somewhere which made me think the following would work, but it doesn't,
any suggestions?
        GdkBitmap *mask = g_malloc( sizeof( GdkBitmap ) );
        ...
        gdk_pixbuf_render_threshold_alpha(
                window->buffer,
                mask, 0, 0, 0, 0, width, height, 1 );
It's segfaulting when it runs that function. It could well be something
silly I've done, it's been a long day :-/
Thanks,
John




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