mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 09:09:32 +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,9 +2434,16 @@ begin
|
||||
|
||||
if not EqualRect(LocalRect, sourceRect^) and
|
||||
(QImage_format(Image) = QImageFormat_RGB32) then
|
||||
QImage_convertToFormat(Image, Image, QImageFormat_ARGB32);
|
||||
|
||||
QPainter_drawImage(Widget, PRect(@LocalRect), image, sourceRect, flags);
|
||||
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);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user