mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-21 07:43:00 +02:00
cocoa: create only bitmaps which can be used for context creation
git-svn-id: trunk@38929 -
This commit is contained in:
parent
68ef99b929
commit
a2bccb587a
@ -725,9 +725,10 @@ begin
|
||||
end;
|
||||
|
||||
HasAlpha := AType in [cbtARGB, cbtRGBA];
|
||||
if HasAlpha then
|
||||
BitmapFormat := NSAlphaNonpremultipliedBitmapFormat
|
||||
else
|
||||
// Non premultiplied bitmaps can't be used for bitmap context
|
||||
//if HasAlpha then
|
||||
// BitmapFormat := NSAlphaNonpremultipliedBitmapFormat
|
||||
//else
|
||||
BitmapFormat := 0;
|
||||
if AType in [cbtARGB, cbtRGB] then
|
||||
BitmapFormat := BitmapFormat or NSAlphaFirstBitmapFormat;
|
||||
@ -754,7 +755,7 @@ end;
|
||||
|
||||
constructor TCocoaBitmap.CreateDefault;
|
||||
begin
|
||||
Create(1, 1, 32, 32, cbaDQWord, cbtARGB, nil);
|
||||
Create(1, 1, 32, 32, cbaByte, cbtARGB, nil);
|
||||
end;
|
||||
|
||||
destructor TCocoaBitmap.Destroy;
|
||||
@ -2535,6 +2536,9 @@ var
|
||||
begin
|
||||
if ADC = nil then Exit;
|
||||
|
||||
if ADC.CGContext = nil then
|
||||
Exit;
|
||||
|
||||
if UseROP2 then
|
||||
AROP2 := ADC.ROP2
|
||||
else
|
||||
|
@ -354,7 +354,6 @@ begin
|
||||
if not AButton.HandleAllocated then
|
||||
Exit;
|
||||
cf := NSStringUtf8(DefEq[ADefault]);
|
||||
|
||||
NSButton(AButton.Handle).setKeyEquivalent(cf);
|
||||
cf.release;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user