From 4ec7e19751e39af9e4db1b4bfabbea3623143d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 19 Mar 2006 22:35:20 +0000 Subject: [PATCH] * fixed filling B_CMAP8 bitmaps with white (255 was the wrong color index) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16843 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/BitmapManager.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/servers/app/BitmapManager.cpp b/src/servers/app/BitmapManager.cpp index 68ee91aa98..fde062affd 100644 --- a/src/servers/app/BitmapManager.cpp +++ b/src/servers/app/BitmapManager.cpp @@ -120,8 +120,12 @@ if (flags & B_BITMAP_WILL_OVERLAY) bitmap->fInitialized = true; if (flags & B_BITMAP_CLEAR_TO_WHITE) { - // should work for most colorspaces - memset(bitmap->Bits(), 255, bitmap->BitsLength()); + if (space == B_CMAP8) + // "255" is the "transparent magic" index for B_CMAP8 bitmaps + memset(bitmap->Bits(), 65, bitmap->BitsLength()); + else + // should work for most colorspaces + memset(bitmap->Bits(), 255, bitmap->BitsLength()); } } else { // Allocation failed for buffer or bitmap list