Hi All, is there a way to draw a line with a angle value?
Here is what i've gotten so far but haven't been able to get it to work.
Thanks for any and all advice..
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var
CenterX, CenterY, VectX, VectY: integer;
X1: integer;
DX,DY,Angle,Dis:Real;
Cx,Cy,Xd,Yd:Real;
begin
Cx:=ClientWidth div 2;Cy:=ClientHeight div 2;
Xd := Cx-X;
Yd := Cy-Y;
Dis := ARCTAN2(Yd, Xd);
Dx := Cos(Dis*Pi/180);
Dy := Sin(Dis*Pi/180);
For X:= 0 to 100 do
begin
Cx:=Cx-Dx;Cy:=Cy-Dy;
Form1.Canvas.Pixels[Round(Cx),Round(Cy)]:=clwhite;
end;
end;