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.


_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to