procedure TForm38.Button1Click(Sender: TObject);
var
Angle:real;
p1,p2,p3,p4:TPoint;
i:integer;
begin
p1.x:=10;//откуда будет линия
p1.y:=20;
p2.x:=100;//куда
p2.y:=70;
with paintbox1 do
begin
Canvas.pen.color:=clred;
Canvas.MoveTo(p1.X,p1.Y);
Canvas.LineTo(p2.X,p2.Y);
end;
for i:=170 to 180 do //170 - угол
with paintbox1 do
begin
Angle:=180*ArcTan2(p2.y-p1.y,p2.x-p1.x)/pi;
p3:=Point(p2.X+Round(15*cos(pi*(Angle+i)/180)),p2.y+Round(15*sin(pi*(Angle+i)/180)));
//15-длина стрелки
p4:=Point(p2.X+Round(15*cos(pi*(Angle-i)/180)),p2.y+Round(15*sin(pi*(Angle-i)/180)));
Canvas.MoveTo(p2.X,p2.Y);
Canvas.LineTo(p3.X,p3.y);
Canvas.MoveTo(p2.X,p2.Y);
Canvas.LineTo(p4.X,p4.y);
end;
end;