I'm trying to scale a path in SVG. For doing so I'm using the javascript-library Raphaël. The scaling itself works just fine, but it's scaling at the center and I want it to scale at a different point (the figure of the path is a circle-sector and I want it to scale at the center of the "circle").
Is there a method to get the height and width of the path? if so, I'll be able to calculate the center of the circle. Or is there another method to find that point?
the path:
var path = "M "+center.x+" "+center.y;
path += "L "+(center.x+startX)+" "+(center.y+startY);
path += "A "+Math.floor(dist)+" "+Math.floor(dist)+" 0 " +(this.endAngle-this.startAngle > Math.PI ? "1 1 " :"0 1 ")+ (center.x+endX)+ " "+(center.y+endY);
path += "L "+center.x + " "+center.y; path += "z";
this.shape = paper.path(path);