урок на делфи 13 - флаг на canvas
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
//рисуем полотно
Canvas.Pen.Color:=clBlack;
Canvas.Brush.Color:=clCream;
Canvas.Rectangle(60,60,300,250);
Canvas.Pen.Width:=2;
Canvas.Brush.Style:=bsClear;
//рисуем круги
Sleep(1000);
Canvas.Pen.Color:=clBlue;
Canvas.Ellipse(80,80,160,160);
Canvas.Pen.Color:=clBlack;
Sleep(1000);
Canvas.Ellipse(140,80,220,160);
Canvas.Pen.Color:=clRed;
Sleep(1000);
Canvas.Ellipse(200,80,280,160);
Canvas.Pen.Color:=clYellow;
sleep(1000);
Canvas.Ellipse(110,130,190,210);
Canvas.Pen.Color:=clGreen;
sleep(1000);
Canvas.Ellipse(170,130,250,210);
end;
end.