mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 11:10:16 +02:00
cocoa: using Device colorspace, instead of Calibrated colorspace for GDI objects. #34427
git-svn-id: trunk@59362 -
This commit is contained in:
parent
07161323f3
commit
62db4e537d
@ -1061,9 +1061,9 @@ end;
|
||||
function TCocoaBitmap.GetColorSpace: NSString;
|
||||
begin
|
||||
if FType in [cbtMono, cbtGray] then
|
||||
Result := NSCalibratedWhiteColorSpace
|
||||
Result := NSDeviceWhiteColorSpace
|
||||
else
|
||||
Result := NSCalibratedRGBColorSpace;
|
||||
Result := NSDeviceRGBColorSpace;
|
||||
end;
|
||||
|
||||
// Cocoa cannot create a context unless the image has alpha pre-multiplied
|
||||
@ -2990,7 +2990,7 @@ begin
|
||||
FColor := AColor;
|
||||
FColor.retain;
|
||||
|
||||
RGBColor := AColor.colorUsingColorSpaceName(NSCalibratedRGBColorSpace);
|
||||
RGBColor := AColor.colorUsingColorSpaceName(NSDeviceRGBColorSpace);
|
||||
|
||||
if Assigned(RGBColor) then
|
||||
SetColor(NSColorToRGB(RGBColor), True)
|
||||
@ -3054,7 +3054,7 @@ begin
|
||||
FCGPattern := nil;
|
||||
FBitmap := nil;
|
||||
FImage := nil;
|
||||
RGBColor := AColor.colorUsingColorSpaceName(NSCalibratedRGBColorSpace);
|
||||
RGBColor := AColor.colorUsingColorSpaceName(NSDeviceRGBColorSpace);
|
||||
if Assigned(RGBColor) then
|
||||
inherited Create(NSColorToRGB(RGBColor), True, AGlobal)
|
||||
else
|
||||
|
@ -499,7 +499,7 @@ begin
|
||||
for y := 0 to ImageRep.pixelsHigh - 1 do
|
||||
for x := 0 to ImageRep.pixelsWide - 1 do
|
||||
begin
|
||||
RGBColor := NSBitmapImageRep(ImageRep).colorAtX_y(x, y).colorUsingColorSpaceName(NSCalibratedRGBColorSpace);
|
||||
RGBColor := NSBitmapImageRep(ImageRep).colorAtX_y(x, y).colorUsingColorSpaceName(NSDeviceRGBColorSpace);
|
||||
if Assigned(RGBColor) then
|
||||
begin
|
||||
if (x = 0) and (y = 0) then
|
||||
|
Loading…
Reference in New Issue
Block a user