mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 23:30:30 +02:00
gtk: fix copying one DC into another with SRCCOPY rop (fixes issue #0013746)
git-svn-id: trunk@20056 -
This commit is contained in:
parent
35ab55a365
commit
1eb5c2a539
@ -42,10 +42,8 @@ type
|
||||
{ TGtk1DeviceContext }
|
||||
|
||||
TGtk1DeviceContext = class(TGtkDeviceContext)
|
||||
private
|
||||
protected
|
||||
function GetFunction: TGdkFunction; override;
|
||||
public
|
||||
function GetFunction: TGdkFunction; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
@ -316,8 +316,6 @@ type
|
||||
procedure CreateBrush; virtual;
|
||||
procedure CreatePen; virtual;
|
||||
procedure CreateBitmap; virtual;
|
||||
|
||||
function GetFunction: TGdkFunction; virtual; abstract;
|
||||
protected
|
||||
// winapi
|
||||
function SelectBitmap(AGdiObject: PGdiObject): PGdiObject; virtual;
|
||||
@ -328,8 +326,8 @@ type
|
||||
procedure SelectBrushProps; virtual;
|
||||
procedure SelectTextProps; virtual;
|
||||
procedure SelectPenProps; virtual;
|
||||
|
||||
procedure SelectRegion;
|
||||
function GetFunction: TGdkFunction; virtual; abstract;
|
||||
public
|
||||
// device handles
|
||||
|
||||
|
@ -2614,8 +2614,10 @@ var
|
||||
{$IFDEF VerboseStretchCopyArea}
|
||||
DebugLn('SrcDevBitmapToDrawable Simple copy');
|
||||
{$ENDIF}
|
||||
gdk_gc_set_function(DstDevContext.GC, GDK_COPY);
|
||||
gdk_window_copy_area(DstDevContext.Drawable, DstDevContext.GC, X, Y,
|
||||
SrcDrawable, XSrc, YSrc, Width, Height);
|
||||
gdk_gc_set_function(DstDevContext.GC, DstDevContext.GetFunction);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
@ -2803,7 +2805,7 @@ begin
|
||||
if (SrcWidth = 0) or (SrcHeight = 0) then exit;
|
||||
|
||||
SizeChange := (Width <> SrcWidth) or (Height <> SrcHeight) or FlipVert or FlipHorz;
|
||||
ROpIsSpecial := (ROp <> SRCCOPY);
|
||||
ROpIsSpecial := (Rop <> SRCCOPY);
|
||||
|
||||
SrcDCOrigin := SrcDevContext.Offset;
|
||||
Inc(XSrc, SrcDCOrigin.X);
|
||||
|
@ -38,10 +38,9 @@ type
|
||||
{ TGtk2DeviceContext }
|
||||
|
||||
TGtk2DeviceContext = class(TGtkDeviceContext)
|
||||
protected
|
||||
function GetFunction: TGdkFunction; override;
|
||||
public
|
||||
procedure DrawTextWithColors(AText: PChar; ALength: LongInt; X, Y: Integer; FGColor, BGColor: PGdkColor);
|
||||
function GetFunction: TGdkFunction; override;
|
||||
end;
|
||||
|
||||
procedure SetLayoutText(ALayout: PPangoLayout; AText: PChar; ALength: PtrInt);
|
||||
|
Loading…
Reference in New Issue
Block a user