mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-10 07:17:19 +01:00
Qt,Qt5: mask must fit final pixmap.
git-svn-id: trunk@62878 -
This commit is contained in:
parent
d78f0bd224
commit
60dbc7bd77
@ -6882,8 +6882,8 @@ var
|
||||
QPixmap_fromImage(AMaskPix, AMaskImg);
|
||||
try
|
||||
|
||||
if IsRectEmpty(MaskRect) then
|
||||
QPixmap_copy(AMaskPix, AScaledPix, 0, 0, Min(Width, QPixmap_Width(AMaskPix)), Min(Height, QPixmap_Height(AMaskPix)) )
|
||||
if IsRectEmpty(MaskRect) or (MaskRect.Size <> DstRect.Size) then
|
||||
QPixmap_scaled(AMaskPix, AScaledPix, Width, Height)
|
||||
else
|
||||
QPixmap_copy(AMaskPix, AScaledPix, MaskRect.Left, MaskRect.Top,
|
||||
MaskRect.Right - MaskRect.Left, MaskRect.Bottom - MaskRect.Top);
|
||||
|
||||
@ -6825,9 +6825,8 @@ var
|
||||
AMaskPix := QPixmap_create();
|
||||
QPixmap_fromImage(AMaskPix, AMaskImg);
|
||||
try
|
||||
|
||||
if IsRectEmpty(MaskRect) then
|
||||
QPixmap_copy(AMaskPix, AScaledPix, 0, 0, Min(Width, QPixmap_Width(AMaskPix)), Min(Height, QPixmap_Height(AMaskPix)) )
|
||||
if IsRectEmpty(MaskRect) or (MaskRect.Size <> DstRect.Size) then
|
||||
QPixmap_scaled(AMaskPix, AScaledPix, Width, Height)
|
||||
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