Lines
Frequently used is also a pair of graphical commands MoveTo and LineTo. With both we move the graphic pen to the new position. The difference between these two commands is that MoveTo does not draw lines, but sets the beginning of the line and LineTo draws the line with set colour and thickness, and sets the end of the line. For example, using these two commands, we can simply draw the number seven (Figure 30).
Figure 30: Line Commands
Sometimes the Line command is used, replacing the MoveTo and LineTo commands. Instead of
Image1.Canvas.MoveTo (X1, Y1);
Image1.Canvas.LineTo (X2, Y2);
we can write
Image1.Canvas.Line (X1, Y1, X2, Y2);