unit TCanvasArc;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormPaint(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: TCanvasArc
// Method: Graphics.TCanvas.Arc
// Method: Forms.TCustomForm.GetClientRect

// BeginCode
{
The following lines of code draw the top quarter of an arc 
bounded by the current window:
} 
procedure TForm1.FormPaint(Sender: TObject);
var
  R: TRect;
begin
  R := GetClientRect;   { Gets the boundaries of the current window }
  Canvas.Arc(R.Left, R.Top, R.Right, R.Bottom, R.Right, R.Top, R.Left, R.Top);
end; 
// EndCode
// EndExample: TCanvasArc
end.
