mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 10:19:16 +02:00
Qt: bugfix - cannot blindly convert shared image, must use new QImage for such ops.
git-svn-id: trunk@16656 -
This commit is contained in:
parent
ddeee54b5c
commit
0f1e56d462
@ -2434,8 +2434,15 @@ begin
|
|||||||
|
|
||||||
if not EqualRect(LocalRect, sourceRect^) and
|
if not EqualRect(LocalRect, sourceRect^) and
|
||||||
(QImage_format(Image) = QImageFormat_RGB32) then
|
(QImage_format(Image) = QImageFormat_RGB32) then
|
||||||
QImage_convertToFormat(Image, Image, QImageFormat_ARGB32);
|
begin
|
||||||
|
ScaledImage := QImage_create();
|
||||||
|
try
|
||||||
|
QImage_convertToFormat(Image, ScaledImage, QImageFormat_ARGB32);
|
||||||
|
QPainter_drawImage(Widget, PRect(@LocalRect), ScaledImage, sourceRect, flags);
|
||||||
|
finally
|
||||||
|
QImage_destroy(ScaledImage);
|
||||||
|
end;
|
||||||
|
end else
|
||||||
QPainter_drawImage(Widget, PRect(@LocalRect), image, sourceRect, flags);
|
QPainter_drawImage(Widget, PRect(@LocalRect), image, sourceRect, flags);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user