Graphics Function: Draws a line from the current graphics position up to and including the end point.
Module: USE DFLIB
Syntax
Results:
The result is of type INTEGER(2). The result is a nonzero value if successful; otherwise, 0.
The line is drawn using the current graphics color, logical write mode, and line style. The graphics color is set with SETCOLORRGB, the write mode with SETWRITEMODE, and the line style with SETLINESTYLE.
If no error occurs, LINETO sets the current graphics position to the viewport point (x, y), and LINETO_W sets the current graphics position to the window point (wx, wy).
If you use FLOODFILLRGB to fill in a closed figure drawn with LINETO, the figure must be drawn with a solid line style. Line style is solid by default and can be changed with SETLINESTYLE.
Compatibility
STANDARD GRAPHICS QUICKWIN GRAPHICS
See Also: GETCURRENTPOSITION, GETLINESTYLE, GRSTATUS, MOVETO, POLYGON, POLYLINEQQ, SETLINESTYLE, SETWRITEMODE
Example
This program draws the figure shown below.
! Build as QuickWin or Standard Graphics
USE DFLIB
INTEGER(2) status
TYPE (xycoord) xy
CALL MOVETO(INT2(80), INT2(50), xy)
status = LINETO(INT2(240), INT2(150))
status = LINETO(INT2(240), INT2(50))
END
Figure: Output of Program LINETO.FOR