mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 22:19:12 +02:00
Qt: fix scaled mask size if mask size is bigger than pixmap to be masked.
git-svn-id: trunk@62912 -
This commit is contained in:
parent
9786f79240
commit
bb082ce6f3
@ -6881,12 +6881,18 @@ 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
|
||||
begin
|
||||
QPixmap_copy(AMaskPix, AScaledPix, MaskRect.Left, MaskRect.Top,
|
||||
MaskRect.Right - MaskRect.Left, MaskRect.Bottom - MaskRect.Top);
|
||||
end;
|
||||
|
||||
ABitmap := QBitmap_Create(AScaledPix);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user