Previous: 4.37.2.78. LineRel procedure To the Table of Contents Next: 4.37.2.80. MoveRel procedure
4.37.2.78. LineRel procedure Table of Contents 4.37.2.80. MoveRel procedure

- 4.37.2.79. -
Table of Contents
4. Standard Units
4.37. Graph - Graph unit
4.37.2. Graph Unit Procedures and Functions
4.37.2.79. LineTo procedure


4.37.2.79. LineTo procedure

Targets: MS-DOS, Win32


Graph Unit

Draws a line from the current pointer to (X,Y).

Declaration:
procedure LineTo(X, Y: Longint);
Remarks:
Draws a line in the style SetLineStyle and uses the color set by SetColor. Use SetWriteMode to determine whether the line is copied or XOR'd to the screen.

Note that
  MoveTo(100, 100);
  LineTo(200, 200);
is equivalent to
  Line(100, 100, 200, 200);
The first method is slower and uses more code. Use LineTo only when the current pointer is at one endpoint of the line. Use LineRel to draw a line a relative distance from the CP. The second method doesn't change the value of the CP.

LineTo moves the current pointer to (X, Y).


Previous: 4.37.2.78. LineRel procedure To the Table of Contents Next: 4.37.2.80. MoveRel procedure
4.37.2.78. LineRel procedure Table of Contents 4.37.2.80. MoveRel procedure

- 4.37.2.79. -