lcl: formatting

git-svn-id: trunk@20422 -
This commit is contained in:
paul 2009-06-05 08:13:38 +00:00
parent a9c33794ae
commit 859e98e674
3 changed files with 16 additions and 14 deletions

View File

@ -1236,23 +1236,25 @@ end;
Params: dc : hdc; ARect: TRect
Returns: True if ARect is not completely clipped away.
------------------------------------------------------------------------------}
function TWidgetSet.RectVisible(dc : hdc; const ARect: TRect) : Boolean;
function TWidgetSet.RectVisible(DC: HDC; const ARect: TRect): Boolean;
var
ClipRGN, RectRgn: hRGN;
Intersection: hRGN;
CombineResult: Integer;
begin
Result:=false;
if (ARect.Left>=ARect.Right) or (ARect.Top>=ARect.Bottom)
or not DCClipRegionValid(DC)
then exit;
ClipRGN:=CreateEmptyRegion;
if GetClipRGN(DC,ClipRGN)>0 then begin
RectRgn:=CreateRectRGN(ARect.Left,ARect.Top,ARect.Right,ARect.Bottom);
Intersection:=CreateEmptyRegion;
CombineResult:=CombineRGN(Intersection,RectRGN,ClipRGN,RGN_AND);
if CombineResult in [SimpleRegion,ComplexRegion] then
Result:=true;
Result := False;
if (ARect.Left >= ARect.Right) or
(ARect.Top >= ARect.Bottom) or
not DCClipRegionValid(DC) then Exit;
ClipRGN := CreateEmptyRegion;
if GetClipRGN(DC, ClipRGN) > 0 then
begin
RectRgn := CreateRectRGN(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);
Intersection := CreateEmptyRegion;
CombineResult := CombineRGN(Intersection, RectRGN, ClipRGN, RGN_AND);
if CombineResult in [SimpleRegion, ComplexRegion] then
Result := True;
DeleteObject(Intersection);
DeleteObject(RectRgn);
end;

View File

@ -192,7 +192,7 @@ function PtInRegion(RGN: HRGN; X, Y: Integer) : Boolean; {$IFDEF IF_BASE_MEMBER}
function RealizePalette(DC: HDC): Cardinal; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function Rectangle(DC: HDC; X1, Y1, X2, Y2: Integer): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function RectVisible(dc : hdc; const ARect: TRect) : Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function RectVisible(DC: HDC; const ARect: TRect): Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function ReleaseCapture : Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function ReleaseDC(hWnd: HWND; DC: HDC): Integer; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
function RemoveProp(Handle: hwnd; Str: PChar): THandle; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}

View File

@ -7572,7 +7572,7 @@ end;
Params: dc : hdc; ARect: TRect
Returns: True if ARect is not completely clipped away.
------------------------------------------------------------------------------}
function TGtkWidgetSet.RectVisible(dc : hdc; const ARect: TRect) : Boolean;
function TGtkWidgetSet.RectVisible(DC: HDC; const ARect: TRect): Boolean;
begin
Result := inherited RectVisible(dc,ARect);
end;