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

git-svn-id: trunk@63665 -
This commit is contained in:
juha 2020-07-28 20:55:55 +00:00
parent 3615ce369e
commit bcfa936e39
4 changed files with 2 additions and 21 deletions

View File

@ -1394,8 +1394,6 @@ begin
end;
procedure TMainIDE.SetupInteractive;
const
BOOL_RESULT: array[Boolean] of String = ('False', 'True');
var
CfgCache: TPCTargetConfigCache;
OldLazDir: String;

View File

@ -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;

View File

@ -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;

View File

@ -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;
{------------------------------------------------------------------------------