mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 11:16:07 +02:00
Qt: fixed clipping in stretchDraw.issue #26004
git-svn-id: trunk@44693 -
This commit is contained in:
parent
2da14ac740
commit
fccbfe2973
@ -6462,6 +6462,7 @@ var
|
|||||||
dx, dy: integer;
|
dx, dy: integer;
|
||||||
OldRop: Integer;
|
OldRop: Integer;
|
||||||
OldBkColor: TColorRef;
|
OldBkColor: TColorRef;
|
||||||
|
RestoreClip: Boolean;
|
||||||
begin
|
begin
|
||||||
{$ifdef VerboseQtWinAPI}
|
{$ifdef VerboseQtWinAPI}
|
||||||
WriteLn('[WinAPI StretchMaskBlt]',
|
WriteLn('[WinAPI StretchMaskBlt]',
|
||||||
@ -6601,7 +6602,16 @@ begin
|
|||||||
if Rop <> SRCCOPY then
|
if Rop <> SRCCOPY then
|
||||||
DstQDC.Rop2 := Integer(Rop);
|
DstQDC.Rop2 := Integer(Rop);
|
||||||
try
|
try
|
||||||
|
RestoreClip := False;
|
||||||
|
if (SrcRect.Left < DstRect.Left) or (SrcRect.Top < DstRect.Top) and
|
||||||
|
DstQDC.getClipping and DstQDC.getClipRegion.containsRect(SrcRect) then
|
||||||
|
begin
|
||||||
|
RestoreClip := True;
|
||||||
|
DstQDC.setClipping(False);
|
||||||
|
end;
|
||||||
DstQDC.drawImage(@DstRect, Image, @SrcRect, QMask, @MaskRect);
|
DstQDC.drawImage(@DstRect, Image, @SrcRect, QMask, @MaskRect);
|
||||||
|
if RestoreClip then
|
||||||
|
DstQDC.setClipping(True);
|
||||||
finally
|
finally
|
||||||
if Rop <> SRCCOPY then
|
if Rop <> SRCCOPY then
|
||||||
DstQDC.Rop2 := OldRop;
|
DstQDC.Rop2 := OldRop;
|
||||||
|
Loading…
Reference in New Issue
Block a user