unit TCanvasChord;

interface

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

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

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: TCanvasChord
// Method: Graphics.TCanvas.Chord

// BeginCode
{
This code draws a chord on the top of an ellipse bounded by
the current window.
} 
procedure TForm1.Button1Click(Sender: TObject);
var
  R: TRect;
begin
  R := GetClientRect;  { Get coordinates of the current window. }
  Canvas.Chord(R.Left, R.Top, R.Right, R.Bottom, R.Right, R.Top, R.Left, R.Top);
end;
// EndCode
// EndExample: TCanvasChord
end.
