# arc - method of object CanvasCtx

###### Description:
Creates complete or partial circle.
###### Syntax:
arc(x As Long, y As Long, r As Long, startAngle As Long, endAngle As Long, [counterclockwise As Long]) As Object
###### Calling:
`ctx.arc(x, y, r, startAngle, endAngle, counterclockwise);`
###### Parameters:
x (Long) The x-coordinate of the circle center (Long) The y-coordinate of the circle center (Long) The radius of the circle (Long) The circle drawing starting angle in radians (0 means that is at the 3 o'clock position) (Long) The ending angle in radians [optional] (Long) Specifies whether the drawing should be counterclockwise or clockwise.false - clockwisetrue - counter-clockwise
###### Note:
In order to create a circle you have to set: startAngle=0 and endAngle=2*Pm.PI.

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.
###### Example1:
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.arc(100, 45, 50, 0, 2 * Pm.PI);ctx.stroke();`
###### Example2:
JavaScriptSelect and copy to clipboard
`ctx.beginPath();ctx.arc(100, 45, 50, 0, 1.5 * Pm.PI);ctx.stroke();`
###### Example3:
JavaScriptSelect and copy to clipboard
`ctx.beginPath();ctx.arc(100, 75, 50, Pm.PI, 2 * Pm.PI);ctx.stroke();`
PROMOTIC 8.3.30 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person