Promotic
WikipediaLinkedInYoutubeTwitterFacebook

moveTo - method of object CanvasCtx

Description:
Moves the starting point of the path to the specified position on the draving area.
Syntax:
Object moveTo(Long x, Long y)
Calling:
ctx.moveTo(x,y);
Parameters:
x(Long) The x-coordinate of path starting point
y(Long) The y-coordinate of path starting point
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.
 
This method is also functional for Web panels.
See also:
Example:
The ctx variable represents the drawing canvas (CanvasCtx). The setup is done on the "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();

History:
Pm8.02.06: Created
PROMOTIC 9.0.4 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