mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 14:29:27 +02:00
LCL-GTK2: Improve TextRect and regions. Issue #37219, patch from Joeny Ang.
git-svn-id: trunk@63665 -
This commit is contained in:
parent
3615ce369e
commit
bcfa936e39
@ -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;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user