![]() |
|
#1
|
|||
|
|||
![]() Код:
unit Unit2; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, ExtCtrls, StdCtrls; type TForm2 = class(TForm) Image1: TImage; Timer1: TTimer; MonthCalendar1: TMonthCalendar; Label1: TLabel; DateTimePicker1: TDateTimePicker; procedure Timer1Timer(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form2: TForm2; implementation {$R *.dfm} var xt,yt,x1,y1,y2,x2,y3,x3:integer; n,t:double; i:byte; procedure TForm2.Timer1Timer(Sender: TObject); begin label1.caption:=Timetostr(time); image1.Canvas.pen.Color:=clblack; image1.Canvas.font.Name:='arial'; Image1.canvas.pen.width:=1; image1.Canvas.font.Size:=12; for i := 1 to 12 do begin xt:=150+round(100*sin(6.28*30*I/360)); Yt:=150+round(100*cos(6.28*30*I/360)); image1.canvas.TEXTOUT(xt,yt,inttostr(i)); end; // преобразование компьютерной системы координат в часовую систему координат n:=n+1; //chasovay Image1.canvas.moveto(150,150); x3:=round(40*sin(6.28*n/216000)); Y3:=round(40*cos(6.28*n/216000)); Image1.canvas.lineto(x3,y3); // minutnay strelka Image1.canvas.moveto(150,150); x2:=round(60*sin(6.28*n/3600)); Y2:=round(60*cos(6.28*n/3600)); Image1.canvas.lineto(x2,y2); //sekundnay strelka Image1.canvas.moveto(150,150); x1:=round(90*sin(6.28*n/60)); Y1:=round(90*cos(6.28*n/60)); Image1.canvas.lineto(x1,y1); //pauza for T := 1 to 20000000 do //stiranie ciferblata i strelok Image1.canvas.brush.color:=clWhite; end; end. // преобразование компьютерной системы координат в часовую систему координат как мне это сделать на этом шаге Последний раз редактировалось Admin, 08.12.2009 в 21:51. |