unit TImageCanvas;

interface

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

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

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: TImageCanvas
// Property: ExtCtrls.TImage.Canvas
// Method: Graphics.TCanvas.Ellipse
// Property: Graphics.TBrush.Color
// Property: Graphics.TBrush.Style

// BeginCode
{
The following example paints a cross-hatched ellipse onto 
Image1 which is a TImage on the form when the user clicks on
Button1.
}
procedure TForm1.Button1Click(Sender: TObject);
begin
  with Image1 do begin
    Canvas.Brush.Color := clRed;
    Canvas.Brush.Style := bsDiagCross;
    Canvas.Ellipse(0, 0, Image1.Width, Image1.Height);
  end;
end;
// EndCode
// EndExample: TImageCanvas
end.
