I’ve got a Raphael.js image that I’ve done, which consists of a set of circles, like so
var paper = Raphael(0,0,100,100);
var circle1 = paper.circ(20,20,10);
var circle2 = paper.circ(40,40,10);
I also have an svg icon in Raphael format (thanks to the lovely site http://readysetraphael.com/) that I’d like to place inside of each circle. Problem is… all the paths in the converted svg icon are now relative to the point (0,0) ! By this is mean all the strings are written like this
paper.path('M 1 1 L 2 0 L 0,2 z')
So my question … is there some clever way to ‘relativise’ this path to make it sit inside each circle, without just going in and changing every single element of the path string by hand to make it draw the same path twice inside the two circles?
Try this. Replace the contents of shp with any other valid path.
fiddle here