I'm trying to draw an image on my Raphael canvas. I don't want to just draw a rect on top of an image or behind it because I want to be able to drag the image around. I have tried the following:
var rect2 = s.rect(posx, posy, 40, 40).attr({
fill: 'url(../images/pi.svg)',
stroke: "5",
opacity: .5,
cursor: "move"
});
But my image either shows a small corner of it in the rect or doesn't show anything at all (depending on which image I use). How can I get a small image on my canvas?