Skip to content Skip to sidebar Skip to footer

Raphael Drawing. Circle With Two Sectors From Different Images

How to draw circle filled by image and how to draw the sector of such circle? Is it possible to animate drawing sector (for example animate it's size by increasing angle)? What i

Solution 1:

To draw a circle filled by image you... simply draw the circle and fill it with an image :D

var c = paper.circle(200, 200, 40);
c.attr({fill:"url(http://path_to_the_image.png)"});

About drawing a sector I think that you actually have to draw a path and then fill it the same way like the circle. Using this technique you also solved the probelm of 2 sectors with different image fills :)

To animate the arc take a look at this example on raphalejs website

Post a Comment for "Raphael Drawing. Circle With Two Sectors From Different Images"