mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 00:03:48 +02:00
Qt5: fix mask size if exceeds destination pixmap
git-svn-id: trunk@62913 -
This commit is contained in:
parent
bb082ce6f3
commit
274cab383e
@ -6821,9 +6821,15 @@ var
|
||||
AMaskPix := QPixmap_create();
|
||||
QPixmap_fromImage(AMaskPix, AMaskImg);
|
||||
try
|
||||
|
||||
if IsRectEmpty(MaskRect) or (MaskRect.Size <> DstRect.Size) then
|
||||
QPixmap_scaled(AMaskPix, AScaledPix, Width, Height)
|
||||
else
|
||||
begin
|
||||
if (QPixmap_width(ATempPixmap) < (DstRect.Right - DstRect.Left)) or
|
||||
(QPixmap_Height(ATempPixmap) < (DstRect.Bottom - DstRect.Top)) then
|
||||
QPixmap_scaled(AMaskPix, AScaledPix, QPixmap_width(ATempPixmap), QPixmap_height(ATempPixmap))
|
||||
else
|
||||
QPixmap_scaled(AMaskPix, AScaledPix, Width, Height);
|
||||
end else
|
||||
QPixmap_copy(AMaskPix, AScaledPix, MaskRect.Left, MaskRect.Top,
|
||||
MaskRect.Right - MaskRect.Left, MaskRect.Bottom - MaskRect.Top);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user