mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 18:59:10 +02:00
Carbon intf: fix monochromatic bitmaps
git-svn-id: trunk@12155 -
This commit is contained in:
parent
0bc9d93106
commit
0dc2093687
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user