Реферат: Графовые модели. Остов минимального веса
end;
end;
procedure TForm1.Image2DblClick(Sender: TObject);
begin
timer1.Enabled:=true;
end;
procedure TForm1.SpeedButton8Click(Sender: TObject);
begin
for i:= 1 to n do
begin
vx[i]:=random(470);
vy[i]:=random(230);
end; end;
procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
vx[idown]:=x;
vy[idown]:=y;
idown:=idown+1;
image1.Canvas.brush.color:= cllime;
image1.Canvas.pen.Color:=clblue;
image1.Canvas.Rectangle(x-1,y-1,x+1,y+1);
end;
procedure TForm1.Image2Click(Sender: TObject);
begin
image1.Canvas.brush.color:= clwhite;
image1.Canvas.pen.Color:=clwhite;
image2.Canvas.brush.color:= clwhite;
image2.Canvas.pen.Color:=clwhite;
image1.Canvas.Rectangle(0,0,image1.Width,image1.Height);