これを試して。shp の内容を他の有効なパスに置き換えます。
var shape,
circleHalfWidth,
circleHalfHeight,
shpHalfHeight,
shpHalfWidth,
targetLeft,
targetTop,
paper,
circle1,
circBBox,
shpBBox,
shp,
radius = 20,
b2,
c2,
b,
s;
shape = "M25.979,12.896,5.979,12.896,5.979,19.562,25.979,19.562z";
paper = new Raphael(0,0,500,500);
circle1 = paper.circle(100,100,radius);
shp = paper.path( shape );
// get objects that contain dimensions of circle and shape
circBBox = circle1.getBBox( );
shpBBox = shp.getBBox( );
// get dimensions that will help us calculate coordinates to centre of circle
circleHalfWidth = circBBox.width / 2;
circleHalfHeight = circBBox.height / 2;
shpHalfWidth = shpBBox.width / 2;
shpHalfHeight = shpBBox.height / 2;
// calculate coordinates to position shape on top left corner of circle
targetLeft = circle1.getBBox( ).x - shp.getBBox( ).x;
targetTop = circle1.getBBox( ).y - shp.getBBox( ).y;
//Calculate how wide is shape allowed to be in circle using pythagoras
c2 = Math.pow( radius, 2 );
b2 = c2 / 2;
b = Math.sqrt( b2 );
// Calculate ratio so that both height and width fit in circle
s = shpBBox.width > shpBBox.height ? ( shpBBox.width / b ) : ( shpBBox.height / b );
// change coordinates so shape will be moved to centre of circle
targetLeft += circleHalfWidth - shpHalfWidth;
targetTop += circleHalfHeight - shpHalfHeight;
// Remember uppercase T so that scaling is ignored when moving shape
shp.transform( "s" + s + "T" + targetLeft + "," + targetTop );
ここでフィドル