mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 20:59:08 +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;
|
end;
|
||||||
|
|
||||||
procedure TMainIDE.SetupInteractive;
|
procedure TMainIDE.SetupInteractive;
|
||||||
const
|
|
||||||
BOOL_RESULT: array[Boolean] of String = ('False', 'True');
|
|
||||||
var
|
var
|
||||||
CfgCache: TPCTargetConfigCache;
|
CfgCache: TPCTargetConfigCache;
|
||||||
OldLazDir: String;
|
OldLazDir: String;
|
||||||
|
@ -1256,7 +1256,7 @@ begin
|
|||||||
if ClipRegion <> nil then
|
if ClipRegion <> nil then
|
||||||
begin
|
begin
|
||||||
RGNType := RegionType(ClipRegion^.GDIRegionObject);
|
RGNType := RegionType(ClipRegion^.GDIRegionObject);
|
||||||
if (RGNType <> ERROR) and (RGNType <> NULLREGION) then
|
if RGNType <> ERROR then
|
||||||
gdk_gc_set_clip_region(FGC, ClipRegion^.GDIRegionObject);
|
gdk_gc_set_clip_region(FGC, ClipRegion^.GDIRegionObject);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -6047,19 +6047,9 @@ end;
|
|||||||
function TGtk2WidgetSet.CreateEmptyRegion: hRGN;
|
function TGtk2WidgetSet.CreateEmptyRegion: hRGN;
|
||||||
var
|
var
|
||||||
GObject: PGdiObject;
|
GObject: PGdiObject;
|
||||||
R: TGDKRectangle;
|
|
||||||
RegionObj: PGdkRegion;
|
|
||||||
RRGN: PGDKRegion;
|
|
||||||
begin
|
begin
|
||||||
GObject := NewGDIObject(gdiRegion);
|
GObject := NewGDIObject(gdiRegion);
|
||||||
R.x := -1;
|
GObject^.GDIRegionObject := gdk_region_new;
|
||||||
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);
|
|
||||||
Result := HRGN({%H-}PtrUInt(GObject));
|
Result := HRGN({%H-}PtrUInt(GObject));
|
||||||
//DebugLn('TGtk2WidgetSet.CreateEmptyRgn A RGN=',DbgS(Result));
|
//DebugLn('TGtk2WidgetSet.CreateEmptyRgn A RGN=',DbgS(Result));
|
||||||
end;
|
end;
|
||||||
|
@ -1871,13 +1871,6 @@ begin
|
|||||||
Result := RegionType(D);
|
Result := RegionType(D);
|
||||||
//DebugLn('TGtk2WidgetSet.CombineRgn B Mode=',dbgs(fnCombineMode),
|
//DebugLn('TGtk2WidgetSet.CombineRgn B Mode=',dbgs(fnCombineMode),
|
||||||
// ' S1=',GDKRegionAsString(S1),' S2=',GDKRegionAsString(S2),' D=',GDKRegionAsString(D),'');
|
// ' 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;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user