mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Painter: Fixed rounding issue for alpha
git-svn-id: svn://ultimatepp.org/upp/trunk@6692 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
0b078b9128
commit
78679ca221
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ inline void AlphaBlend(RGBA& t, const RGBA& c)
|
|||
t.r = c.r + (alpha * t.r >> 8);
|
||||
t.g = c.g + (alpha * t.g >> 8);
|
||||
t.b = c.b + (alpha * t.b >> 8);
|
||||
t.a = c.a + (alpha * t.a >> 8);
|
||||
t.a = c.a + ((256 - c.a) * t.a >> 8);
|
||||
}
|
||||
|
||||
inline void AlphaBlendCover8(RGBA& t, const RGBA& c, int cover)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue