Carbon intf: fix monochromatic bitmaps

git-svn-id: trunk@12155 -
This commit is contained in:
tombo 2007-09-24 07:13:19 +00:00
parent 0bc9d93106
commit 0dc2093687

View File

@ -197,11 +197,16 @@ begin
DebugLn('TCarbonWidgetSet.CreateBitmap');
{$ENDIF}
// force 32-bit depth
if (BitmapBits = nil) and (BitCount = 24) then BitCount := 32;
// WORKAROUND: force context supported depths
if BitmapBits = nil then
begin
if BitCount = 24 then BitCount := 32;
if BitCount = 1 then BitCount := 8;
end;
case BitCount of
1: bmpType := cbtMono;
1: bmpType := cbtMono;
8: bmpType := cbtGray;
32: bmpType := cbtARGB;
else
bmpType := cbtRGB;