Previous: IsLfbUsed function To the Table of Content Next: LineRel procedure

- 4.37.2.77 -
Standard Units
Graph Unit
Graph Unit Procedures and Functions

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: IsLfbUsed function To the Table of Content Next: LineRel procedure
IsLfbUsed function Table of Content LineRel procedure

- 4.37.2.77 -