Skip to content

textmode.js / Textmodifier / line

Method: line()

ts
line(
   x1, 
   y1, 
   x2, 
   y2): void;

Draw a line from (x1, y1) to (x2, y2).

Parameters

ParameterTypeDescription
x1numberStart X coordinate in grid cells.
y1numberStart Y coordinate in grid cells.
x2numberEnd X coordinate in grid cells.
y2numberEnd Y coordinate in grid cells.

Returns

void

Example