bug-gnustep
[Top][All Lists]
Advanced

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

Re: Alpha compositing in gnustep-back


From: Adam Fedor
Subject: Re: Alpha compositing in gnustep-back
Date: Sat, 13 Jul 2002 21:39:02 -0600
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.0rc2) Gecko/20020513

Thanks. I added this.

Jeff Teunissen wrote:
XGBitmap's _pixmap_combine_alpha() and _bitmap_combine_alpha() functions
don't quite work right. Specifically, the colors are all wrong.

For some reason, the colors seem to be scaled by the value of alpha
(127/127/127/127 becomes 63/63/63/127 somewhere). In my spare time, I've
been working on them to make them generate correct output.


Well, colors are supposed to be scaled by alpha. Thats how alpha works. But perhaps when you combine two colors together they need to be unscaled.


As part of trying to understand the functions, I partially rewrote the
fast paths for them. The code is shorter, but it may be slower since the
math is done in floating point.


It's about 10% slower in my tests. But that may not be accurate.

--
Adam Fedor, Digital Optics Corp.      | I'm glad I hate spinach, because
http://www.doc.com                    | if I didn't, I'd eat it, and you
                                      | know how I hate the stuff.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]