user3454558
user3454558

Reputation: 299

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.

Upvotes: 4

Views: 3701

Answers (1)

Lanny
Lanny

Reputation: 11294

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/

Upvotes: 7

Related Questions