I am passing image to Raphael. Currently image is displaying square, i want the image to displayed in circle format.
<div class="demo"></div>
JavaScript
var r = Raphael("demo")
var myimage="xyz.jpg"
var img = r.image(myimage, 81, 80, 50, 50);
// displaying image in square (need to be circle)
Please help me out. Thanks
The function Element.attr(…), sets the attributes of an element. Perhaps you can create a circle and then fill it with your image. The attr is “fill”.
That example is from the Raphael’s web, you should try:
or
Hope that helps,
Gabriel.