Re: Transparent applets?
- From: George <jirka 5z com>
- To: gnome-devel-list gnome org, John Ellis <johne bellatlantic net>
- Subject: Re: Transparent applets?
- Date: Mon, 20 Mar 2000 23:53:38 -0800
On Fri, Mar 10, 2000 at 05:12:34AM -0500, John Ellis wrote:
> 2) What is the best way to render a portion of one GdkPixbuf onto
> another while applying the source's alpha channel? I made up my own
> func, but is one already available, maybe in libart ?
Well the GdkPixbuf's are just ArtPixbuf's which can have alpha and non-alpha.
libart will only handle composing of things onto rgb buffers. So I guess
compose everything onto an rgb and then draw that.
For the portions, you can refer to a region of an rgb(a) buffer by making the
pointer to the upper left corner of the region be the pointer to the rgb, and
passing the region width and height and the rowstride of the original buffer.
That way you don't have to copy nor write special functions, since the
rowstride will handle the fact that your lines have actually much more data
in them.
George
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]