Promotic
WikipediaLinkedInYoutubeTwitterFacebook

arcTo - method of the CanvasCtx object

Description:
Creates an arc between two tangents.
Syntax:
Object arcTo(Long x1, Long y1, Long x2, Long y2, Long r)
Parameters:
x1(Long) The x-coordinate of the beginning of the arc
y1(Long) The y-coordinate of the beginning of the arc
x2(Long) The x-coordinate of the end of the arc
y2(Long) The y-coordinate of the end of the arc
r(Long) The radius of the arc
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 in Web panels.
See also:
- CanvasCtx.arc (method)
Example:
The ctx variable represents the drawing canvas (CanvasCtx). The setup is done on the "Draw" tab 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(20, 20);  //Creates a starting point
ctx.lineTo(100, 20);  //Creates a horizontal line
ctx.arcTo(150, 20, 150, 70, 50);  //Creates an arc
ctx.lineTo(150, 120);  //Creates a vertical line
ctx.stroke();  //Draw it

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