2D_POLY_TO

2D_POLY_TO X,Y

DRAWS A LINE FROM THE CURRENT POSITION TO (X,Y), THEN (X,Y) BECOMES CURRENT POSITION

  • Type: Command
  • Parameters: 2
  • Group: Drawing

ACTION

The command 2D_POLY_TO X,Y draws the "2D target" system object (set by 2D_TARGET_IS), a line from the current position of pen to the point (X,Y). The line takes the drawing color set by 2D_PEN_COLOR and the drawing width set by 2D_PEN_WIDTH.

By default, the drawing color is black, the drawing width is 1 pixel, and the "2D target" system object for drawing is : FORM number 0.

X and Y are expressed in pixels and the origin (0,0) of the coordinates is the upper left corner of the system object.

The current position of drawing becomes then (X,Y).

SYNTAX: 2D_POLY_TO X,Y

  • X = X-component value (integer or real) of the point.
  • Y = Y-component value (integer or real) of the point.

USE

  • The command 2D_POLY_TO is used to draw a single line or a polyline (see the examples).

ERROR

  • If X or Y is not a correct expression.

EXAMPLE

rem EXAMPLE1: draw a single line

rem draw a line: from point (10,20)

2d_poly_from 10,20

rem to point (110,120)

2d_poly_to 110,120

rem ---------------------------------

rem EXAMPLE2: draw a polyline

rem draw a line: from point (20,30)

2d_poly_from 20,30

rem to point (120,130)

2d_poly_to 120,130

rem then to point (200,300), from the point (120,130)

2d_poly_to 200,300

SEE ALSO

2D_ARC

2D_LINE

2D_POLY_FROM

2D_POINT

2D_PEN_COLOR

2D_PEN_DASH

2D_PEN_DASH_DOT

2D_PEN_DASH_DOT_DOT

2D_PEN_DOT

2D_PEN_SOLID

2D_PEN_WIDTH