Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to draw a circle using arcs in createjs?

How to draw an arc in createJS. I have gone through arcTo function but its not what i want. I want to be able to draw several arcs which when put together resembles a circle. for Ex: I want to be able to draw a circle using 8 arcs. not able to do it using ArcTo function. Please some one suggest me a way to do it.

like image 874
user3454558 Avatar asked Sep 17 '25 11:09

user3454558


1 Answers

The arcTo function draws directly from the specified point. The arc() function is what you are looking for.

Here is a quick sample that draws random segments. http://jsfiddle.net/lannymcnie/nJKHk/

shape.graphics.arc(0,0,50,startAngle,endAngle);

here is another sample with random color fills. http://jsfiddle.net/lannymcnie/nJKHk/1/

like image 103
Lanny Avatar answered Sep 20 '25 12:09

Lanny