mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 23:59:24 +02:00
Qt: added BLACKNESS and WHITENESS support into TQtWidgetSet.StretchMaskBlt()
git-svn-id: trunk@35473 -
This commit is contained in:
parent
5866b2577e
commit
5e51d368a3
@ -6227,6 +6227,7 @@ var
|
||||
SrcMatrix: QTransformH;
|
||||
dx, dy: integer;
|
||||
OldRop: Integer;
|
||||
OldBkColor: TColorRef;
|
||||
begin
|
||||
{$ifdef VerboseQtWinAPI}
|
||||
WriteLn('[WinAPI StretchMaskBlt]',
|
||||
@ -6332,6 +6333,23 @@ begin
|
||||
if TmpMask <> nil then
|
||||
QImage_destroy(TmpMask);
|
||||
end else
|
||||
begin
|
||||
if (Rop = BLACKNESS) or (Rop = WHITENESS) then
|
||||
begin
|
||||
OldRop := DstQDC.Rop2;
|
||||
DstQDC.Rop2 := SRCCOPY;
|
||||
try
|
||||
if (Rop = BLACKNESS) then
|
||||
OldBkColor := DstQDC.SetBkColor(clBlack)
|
||||
else
|
||||
OldBkColor := DstQDC.SetBkColor(clWhite);
|
||||
with DstRect do
|
||||
DstQDC.fillRect(Left, Top, Right - Left, Bottom - Top);
|
||||
finally
|
||||
DstQDC.SetBkColor(OldBkColor);
|
||||
DstQDC.Rop2 := OldRop;
|
||||
end;
|
||||
end else
|
||||
begin
|
||||
OldRop := DstQDC.Rop2;
|
||||
if Rop <> SRCCOPY then
|
||||
@ -6343,6 +6361,7 @@ begin
|
||||
DstQDC.Rop2 := OldRop;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
if SrcQDC.vImage = nil then
|
||||
QImage_destroy(Image);
|
||||
|
Loading…
Reference in New Issue
Block a user