Promotic
WikipediaLinkedInYoutubeTwitterFacebook

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
y(Long) The y-coordinate of the circle center
r(Long) The radius of the circle
startAngle(Long) The circle drawing starting angle in radians (0 is at the 3 o'clock position)
endAngle(Long) The ending angle in radians
counterclockwise[optional] (Long) Specifies whether the drawing should be counterclockwise or clockwise.
false - clockwise
true - 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.
See also:
Example1:
ctx.arc(100, 75, 50, 0, 2*Pm.PI);
Example2:
ctx.arc(100, 75, 50, 0, 1.5*Pm.PI);
Example3:
ctx.arc(100, 75, 50, Pm.PI, 2*Pm.PI);
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice