mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 17:39:16 +02:00
Gtk2: set proper ROP mode when using StretchBlt(), BitBlt() and StretchMaskBlt(). issue #23742
git-svn-id: trunk@62859 -
This commit is contained in:
parent
ff5b89a4f7
commit
bd841f4865
@ -4093,7 +4093,7 @@ var
|
|||||||
SrcDCOrigin: TPoint;
|
SrcDCOrigin: TPoint;
|
||||||
DstDCOrigin: TPoint;
|
DstDCOrigin: TPoint;
|
||||||
SrcWholeWidth, SrcWholeHeight: integer;
|
SrcWholeWidth, SrcWholeHeight: integer;
|
||||||
DstWholeWidth, DstWholeHeight: integer;
|
DstWholeWidth, DstWholeHeight, AOldRop: integer;
|
||||||
begin
|
begin
|
||||||
Result := IsValidDC(DestDC) and IsValidDC(SrcDC);
|
Result := IsValidDC(DestDC) and IsValidDC(SrcDC);
|
||||||
{$IFDEF VerboseStretchCopyArea}
|
{$IFDEF VerboseStretchCopyArea}
|
||||||
@ -4266,6 +4266,7 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
{$IFDEF VerboseGtkToDos}{$note tode remove, earlier checks require drawable <> nil}{$ENDIF}
|
{$IFDEF VerboseGtkToDos}{$note tode remove, earlier checks require drawable <> nil}{$ENDIF}
|
||||||
|
AOldRop := SetROP2(DestDC, Rop);
|
||||||
if SrcDevContext.Drawable = nil
|
if SrcDevContext.Drawable = nil
|
||||||
then begin
|
then begin
|
||||||
if DstDevContext.Drawable = nil
|
if DstDevContext.Drawable = nil
|
||||||
@ -4281,6 +4282,7 @@ begin
|
|||||||
else
|
else
|
||||||
Result := DrawableToDrawable;
|
Result := DrawableToDrawable;
|
||||||
end;
|
end;
|
||||||
|
SetROP2(DestDC, AOldRop);
|
||||||
|
|
||||||
if TempPixmap <> nil
|
if TempPixmap <> nil
|
||||||
then gdk_pixmap_unref(TempPixmap);
|
then gdk_pixmap_unref(TempPixmap);
|
||||||
|
Loading…
Reference in New Issue
Block a user