Jump to content

TMapView Draw route

Recommended Posts

11 hours ago, Marat1961 said:

I think that's how it will work!
DrawLine (A, B);

Delphi 10.4.1 Draws crookedly, the lines go somewhere above

Share this post

Link to post

Let's try to draw a straight line from point A to point B.

Put a button on the form and write in the onClick handler:

TPoint = record
   x, y: Integer;

procedure DrawLine(A, B: TPoint);
   Form1.Canvas.MoveTo(A.x, A.y);
   Form1.Canvas.LineTo(B.x, B.y);

A.x: = 0;
A.y: = 0;
B.x: = 100;
B.y: = 10;
DrawLine(A, B);


Edited by Marat1961

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now