Promotic
WikipediaLinkedInYoutubeTwitterFacebook

lineTo - method of object CanvasCtx

Description:
Adds a new point and creates a line from that point to the last specified point.
Syntax:
lineTo(x As Long, y As Long) As Object
Calling:
ctx.lineTo(x, y);
Parameters:
x(Long) The x-coordinate for line drawing
y(Long) The y-coordinate for line drawing
Note:
The method creates a path. Therefore before this method is called the beginPath method should be called. For the rendering itself the stroke or fill method is used.
 
The method can also be called in the graphic item events for Web panels.
See also:
Example:
The ctx variable represents the drawing canvas (CanvasCtx). The setup is done on Draw page at the beginning of the script of drawing event onDraw as follows:
 
var ctx = pEvent.GetCtx(1);
JavaScriptSelect and copy to clipboard

ctx.beginPath();
ctx.moveTo(10, 20);
ctx.lineTo(40, 20);
ctx.stroke();
PROMOTIC 9.0.0 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice