diff --git a/lcl/interfaces/gtk/gtkwinapi.inc b/lcl/interfaces/gtk/gtkwinapi.inc index a96b34b059..add2e86b01 100644 --- a/lcl/interfaces/gtk/gtkwinapi.inc +++ b/lcl/interfaces/gtk/gtkwinapi.inc @@ -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; {------------------------------------------------------------------------------ diff --git a/lcl/interfaces/gtk2/gtk2winapi.inc b/lcl/interfaces/gtk2/gtk2winapi.inc index bb68529152..f3ef15f6b9 100644 --- a/lcl/interfaces/gtk2/gtk2winapi.inc +++ b/lcl/interfaces/gtk2/gtk2winapi.inc @@ -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; {------------------------------------------------------------------------------