* a hack to support transparent CMAP8 color in bitmaps

(this would fix the white background on disabled looking
   icons if Tracker would still use B_CMAP8 icons)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18840 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2006-09-14 17:57:37 +00:00
parent af957c251b
commit a907e70198

View File

@ -133,7 +133,8 @@ blend_color_hspan_blend(int x, int y, unsigned len,
if (covers) {
// non-solid opacity
do {
if (*covers) {
// if (*covers) {
if (*covers && (colors->a & 0xff)) {
if (*covers == 255) {
ASSIGN_BLEND(p, colors->r, colors->g, colors->b);
} else {
@ -148,7 +149,9 @@ blend_color_hspan_blend(int x, int y, unsigned len,
// solid full opcacity
if (cover == 255) {
do {
if (colors->a & 0xff) {
ASSIGN_BLEND(p, colors->r, colors->g, colors->b);
}
p += 4;
++colors;
} while(--len);