Please enable JavaScript to view this site.

ESL Documentation

The draw by and draw to statements draw a straight line from the current position of the graphics cursor to the specified position. These statements move the graphics and text cursors exactly as the move statements do, but they also draw lines from the old position to the new.

 

ESL begins at the current position of the graphics cursor. The cursor then moves the specified number of X and Y coordinates in the coordinate system of the object, drawing a straight line to the new position. If additional sets of coordinates are specified in the statement, ESL continues to move the cursor and to draw additional lines. Each set of X and Y coordinates must be separated by commas; for example:

 

draw 50 50, 50 0, 50 -50

 

Here, the cursor moves 50 positions in the X direction and 50 positions in the Y direction, drawing a line from the current graphics cursor position to this new position. Then, from the new position, the cursor moves 50 positions in the X direction, continuing the line; because the Y coordinate is 0, the cursor does not move in the Y direction. Finally, the cursor moves 50 additional positions in the X direction and -50 positions in the Y direction, and the third line is drawn.

 

Regardless of the initial position of the graphics cursor, the line drawn by this example would look like this:

 

_img281

 

The draw to statement draws a line beginning at the current position of the graphics cursor to an absolute position, moving the cursor to the specified coordinate positions. First, ESL draws a line from the current position to the new position indicated by the first X Y coordinates specified. Then, if additional sets of coordinates are specified in the statement, ESL continues drawing the line to the second set of coordinates, and so on. Again, each set of coordinates must be separated by commas; for example:

 

draw to 25 25, 100 100

 

Here, ESL draws a line from the starting position of the graphics cursor to position 25 25 in the object's parent. Then, ESL continues drawing from position 25 25 to position 100 100.