mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 14:32:34 +02:00
LCL: Correction for RectInRegion in GTK/GTK2 bindings. Issue #23239
git-svn-id: trunk@39223 -
This commit is contained in:
parent
edbe2280e7
commit
b36cc487aa
@ -7586,7 +7586,16 @@ begin
|
||||
//DebugLn(Format('trace:< [TGtkWidgetSet.Rectangle] DC:0x%x, X1:%d, Y1:%d, X2:%d, Y2:%d', [DC, X1, Y1, X2, Y2]));
|
||||
end;
|
||||
|
||||
// Determines if the specified rectangle is within the boundaries of a region.
|
||||
{------------------------------------------------------------------------------
|
||||
Function: RectInRegion
|
||||
Params: RGN: HRGN; ARect: TRect
|
||||
Returns: True if any part of the specified rectangle lies within the
|
||||
boundaries of the region.
|
||||
|
||||
Determines whether any part of the specified rectangle is within the boundaries
|
||||
of a region.
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
function TGtkWidgetSet.RectInRegion(RGN: HRGN; ARect: TRect): Boolean;
|
||||
var
|
||||
AGdkRect: TGdkRectangle;
|
||||
@ -7594,7 +7603,7 @@ begin
|
||||
//todo: sanity checks for valid handle etc.
|
||||
AGdkRect := GdkRectFromRect(ARect);
|
||||
Result := gdk_region_rect_in({%H-}PGdiObject(RGN)^.GDIRegionObject, @AGdkRect)
|
||||
= GDK_OVERLAP_RECTANGLE_IN;
|
||||
<> GDK_OVERLAP_RECTANGLE_OUT;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
@ -7055,7 +7055,16 @@ begin
|
||||
{$IFDEF DebugGDKTraps}EndGDKErrorTrap;{$ENDIF}
|
||||
end;
|
||||
|
||||
// Determines if the specified rectangle is within the boundaries of a region.
|
||||
{------------------------------------------------------------------------------
|
||||
Function: RectInRegion
|
||||
Params: RGN: HRGN; ARect: TRect
|
||||
Returns: True if any part of the specified rectangle lies within the
|
||||
boundaries of the region.
|
||||
|
||||
Determines whether any part of the specified rectangle is within the boundaries
|
||||
of a region.
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
function TGtk2WidgetSet.RectInRegion(RGN: HRGN; ARect: TRect): Boolean;
|
||||
var
|
||||
AGdkRect: TGdkRectangle;
|
||||
@ -7063,7 +7072,7 @@ begin
|
||||
//todo: sanity checks for valid handle etc.
|
||||
AGdkRect := GdkRectFromRect(ARect);
|
||||
Result := gdk_region_rect_in({%H-}PGdiObject(RGN)^.GDIRegionObject, @AGdkRect)
|
||||
= GDK_OVERLAP_RECTANGLE_IN;
|
||||
<> GDK_OVERLAP_RECTANGLE_OUT;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user