2. .

 

, , .

 

:

 

 

Unit1.pas

 

unit Unit1;

 

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}

 

TForm1.FormPaint:

procedure TForm1.FormPaint(Sender: TObject);

begin

Color:=clInfoBk; // -

 

"" "".

, Points

 Canvas.Brush.Style:=bsSolid;

Canvas.Pen.Color:=clBlue;

Canvas.Brush.Color:=clYellow;

 

Canvas.Polygon([Point(40, 20), Point(48, 40),

Point(70, 40), Point(52, 52),Point(60, 75),

Point(40, 60), Point(20, 75),

Point(28, 52), Point(10, 40),Point(32, 40)]);

 

Canvas.Brush.Color:=clInfoBk;

Canvas.TextOut( 90, 50,'Polygon' );

 

:

 Canvas.Brush.Style:=bsCross;

Canvas.Pen.Color:= clTeal;

Canvas.Brush.Color := clRed;

Canvas.Ellipse(10, 95, 65, 150); //

 

Canvas.TextOut( 90, 115,'Ellipse' );

 

Canvas.Pen.Color := clPurple;

Canvas.MoveTo( 180, 20 );

Canvas.LineTo( 200, 40 );

Canvas.LineTo( 180, 60 );

Canvas.LineTo( 240, 60 );

Canvas.LineTo( 240, 75 );

 

Canvas.TextOut( 260, 50,'LineTo' );

 

Canvas.Pen.Color := clMaroon;

Canvas.Brush.Color := clLime;

Canvas.Brush.Style:=bsFDiagonal;

Canvas.Rectangle(10, 170, 65, 225); //

 

Canvas.TextOut( 90, 185,'Rectangle' );

 

Canvas.Pen.Color := clTeal;

Canvas.Brush.Color := clBtnFace;

Canvas.Brush.Style:=bsDiagCross;

Canvas.RoundRect(180, 95, 240, 150,20,20);

 

Canvas.TextOut( 260, 115,'RoundRect' );

 

Canvas.Brush.Style:=bsSolid;

Canvas.Pen.Color:=clBlue;

Canvas.Brush.Color:=clAqua;

Canvas.Polygon([Point(180, 210), Point(230, 170), Point(240, 225)]);

 {, - }

 

Canvas.Brush.Color:=clInfoBk;

Canvas.TextOut( 260, 185,'Polygon' );

end;

 

end.