override and implement RoundRect (from martin smat)

git-svn-id: trunk@8466 -
This commit is contained in:
micha 2006-01-07 19:01:40 +00:00
parent 8e93ee346b
commit 73f141bcdd
2 changed files with 14 additions and 0 deletions

View File

@ -2657,6 +2657,19 @@ Begin
Assert(False, Format('Trace:< [TWin32WidgetSet.RestoreDC] DC:0x%x, Saved: %d --> %s', [Integer(DC), SavedDC, BOOL_TEXT[Result]]));
End;
{------------------------------------------------------------------------------
Method: RoundRect
Params: DC, X1, Y1, X2, Y2, RX, RY
Returns: true if succesfull, false otherwise
Draws a Rectangle with optional rounded corners. RY is the radial height
of the corner arcs, RX is the radial width.
------------------------------------------------------------------------------}
function TWin32WidgetSet.RoundRect(DC: HDC; X1, Y1, X2, Y2: Integer; RX, RY : Integer): Boolean;
begin
Result := Windows.RoundRect(DC, X1, Y1, X2, Y2, RX, RY);
end;
{------------------------------------------------------------------------------
Method: SaveDC
Params: DC - a DC to save

View File

@ -155,6 +155,7 @@ function ReleaseDC(Window: HWND; DC: HDC): Integer; Override;
function ReleaseDesignerDC(Window: HWND; DC: HDC): Integer; Override;
function RemoveProp(Handle: hwnd; Str: PChar): THandle; override;
function RestoreDC(DC: HDC; SavedDC: Integer): Boolean; Override;
function RoundRect(DC: HDC; X1, Y1, X2, Y2: Integer; RX, RY : Integer): Boolean; override;
function SaveDC(DC: HDC): Integer; Override;
function ScreenToClient(Handle: HWND; Var P: TPoint): Integer; Override;