mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 02:59:21 +02:00
Qt5, Qt6: fixed bad rendering of TBitmaps, use rgba premultiplied images only for darwin.
(cherry picked from commit 0edd507409
)
This commit is contained in:
parent
db5d443369
commit
61fe672c22
@ -489,9 +489,12 @@ begin
|
|||||||
//issue #39878
|
//issue #39878
|
||||||
//Actually setting premultiplied format for x11 and win32 does not harm
|
//Actually setting premultiplied format for x11 and win32 does not harm
|
||||||
//so darwin ifdef should be removed after testing under x11 and win32.
|
//so darwin ifdef should be removed after testing under x11 and win32.
|
||||||
|
//check not skipmask and masksize only for darwin. issue #40516
|
||||||
|
{$IFDEF DARWIN}
|
||||||
if not ASkipMask and (ARawImage.MaskSize > 0) then
|
if not ASkipMask and (ARawImage.MaskSize > 0) then
|
||||||
ImageFormat := QImageFormat_ARGB32_Premultiplied
|
ImageFormat := QImageFormat_ARGB32_Premultiplied
|
||||||
else
|
else
|
||||||
|
{$ENDIF}
|
||||||
ImageFormat := QImageFormat_ARGB32;
|
ImageFormat := QImageFormat_ARGB32;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
|
@ -489,11 +489,12 @@ begin
|
|||||||
//issue #39878
|
//issue #39878
|
||||||
//Actually setting premultiplied format for x11 and win32 does not harm
|
//Actually setting premultiplied format for x11 and win32 does not harm
|
||||||
//so darwin ifdef should be removed after testing under x11 and win32.
|
//so darwin ifdef should be removed after testing under x11 and win32.
|
||||||
{.$IFDEF DARWIN}
|
//check not skipmask and masksize only for darwin. issue #40516
|
||||||
|
{$IFDEF DARWIN}
|
||||||
if not ASkipMask and (ARawImage.MaskSize > 0) then
|
if not ASkipMask and (ARawImage.MaskSize > 0) then
|
||||||
ImageFormat := QImageFormat_ARGB32_Premultiplied
|
ImageFormat := QImageFormat_ARGB32_Premultiplied
|
||||||
else
|
else
|
||||||
{.$ENDIF}
|
{$ENDIF}
|
||||||
ImageFormat := QImageFormat_ARGB32;
|
ImageFormat := QImageFormat_ARGB32;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user