Function LineTo

Top 

Declaration:

void LineTo(unsigned long handle, int x, int y);

Description

Draws a line from the point set up by the MoveTo or LineTo function to the point with coordinates (x, y). The line is drawn with the pen selected with the SelectPen function (or a standard pen, when SelectPen was not called). After the LineTo call, the benchmark is moved to the destination point.

Example

  // To draw triangle ABC

  MoveTo(handle, 10, 10);  // point A

  LineTo(handle, 50, 50);  // A --> B

  LineTo(handle, 20, 40);  // B --> C

  LineTo(handle, 10, 10);  // C --> A