Commit 6b53cb27 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Fix the non-trivial case in color_over.

parent 62781a6b
......@@ -94,9 +94,9 @@ static inline ARGB color_over(ARGB bg, ARGB fg)
if (bg_alpha == 0) return fg;
a = bg_alpha + fg_alpha;
b = ((bg&0xff)*bg_alpha + (fg&0xff)*fg_alpha)*0xff/a;
g = (((bg>>8)&0xff)*bg_alpha + ((fg>>8)&0xff)*fg_alpha)*0xff/a;
r = (((bg>>16)&0xff)*bg_alpha + ((fg>>16)&0xff)*fg_alpha)*0xff/a;
b = ((bg&0xff)*bg_alpha + (fg&0xff)*fg_alpha)/a;
g = (((bg>>8)&0xff)*bg_alpha + ((fg>>8)&0xff)*fg_alpha)/a;
r = (((bg>>16)&0xff)*bg_alpha + ((fg>>16)&0xff)*fg_alpha)/a;
return (a<<24)|(r<<16)|(g<<8)|b;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment