Commit bcfa936e authored by Juha Manninen's avatar Juha Manninen
Browse files

LCL-GTK2: Improve TextRect and regions. Issue #37219, patch from Joeny Ang.

git-svn-id: trunk@63665 -
parent 3615ce36
......@@ -1394,8 +1394,6 @@ begin
end;
procedure TMainIDE.SetupInteractive;
const
BOOL_RESULT: array[Boolean] of String = ('False', 'True');
var
CfgCache: TPCTargetConfigCache;
OldLazDir: String;
......
......@@ -1256,7 +1256,7 @@ begin
if ClipRegion <> nil then
begin
RGNType := RegionType(ClipRegion^.GDIRegionObject);
if (RGNType <> ERROR) and (RGNType <> NULLREGION) then
if RGNType <> ERROR then
gdk_gc_set_clip_region(FGC, ClipRegion^.GDIRegionObject);
end;
......
......@@ -6047,19 +6047,9 @@ end;
function TGtk2WidgetSet.CreateEmptyRegion: hRGN;
var
GObject: PGdiObject;
R: TGDKRectangle;
RegionObj: PGdkRegion;
RRGN: PGDKRegion;
begin
GObject := NewGDIObject(gdiRegion);
R.x := -1;
R.y := -1;
R.width := 1;
R.height := 1;
RRGN := gdk_region_new;
RegionObj := PGdkRegion(gdk_region_union_with_rect(RRGN,@R));
GObject^.GDIRegionObject := RegionObj;
gdk_region_destroy(RRGN);
GObject^.GDIRegionObject := gdk_region_new;
Result := HRGN({%H-}PtrUInt(GObject));
//DebugLn('TGtk2WidgetSet.CreateEmptyRgn A RGN=',DbgS(Result));
end;
......
......@@ -1871,13 +1871,6 @@ begin
Result := RegionType(D);
//DebugLn('TGtk2WidgetSet.CombineRgn B Mode=',dbgs(fnCombineMode),
// ' S1=',GDKRegionAsString(S1),' S2=',GDKRegionAsString(S2),' D=',GDKRegionAsString(D),'');
{if (Result = NullRegion) and
((RegionType(S1) <> NullRegion) or ((RegionType(S2) <> NullRegion))) then
begin
DeleteObject(Dest);
Dest := CreateEmptyRegion;
Result := RegionType(Dest);
end;}
end;
{------------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment