Previous: 4.37.2.76. IsLfbUsed function To the Table of Contents Next: 4.37.2.78. LineRel procedure
4.37.2.76. IsLfbUsed function Table of Contents 4.37.2.78. LineRel procedure

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


4.37.2.77. Line procedure

Targets: MS-DOS, Win32


Graph Unit

Draws a line from the point (X1, Y1) to (X2, Y2).

Declaration:
procedure Line(X1, Y1, X2, Y2: Longint);
procedure Line(X1, Y1, X2, Y2: Longint; Color: DWORD);
Remarks:
Draws a line in the style defined by 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);
  MoveTo(200, 200);
Use LineTo when the current pointer (CP) is at one endpoint of the line. If you want the CP updated automatically when the line is drawn, use LineRel to draw a line relative the current pointer (CP). Line doesn't update the CP.


Previous: 4.37.2.76. IsLfbUsed function To the Table of Contents Next: 4.37.2.78. LineRel procedure
4.37.2.76. IsLfbUsed function Table of Contents 4.37.2.78. LineRel procedure

- 4.37.2.77. -