Draw a path relative to another SVG element

89 views
Skip to first unread message

Mattia

unread,
Feb 11, 2012, 1:01:47 PM2/11/12
to Raphaël
Hi folks,
I have a 500x400px container, where I'm working with RaphaelJS to
manage some SVG goodies. I've loaded an image with this code:

var img = paper.image("images/image.jpg", 50, 200, 90, 110);
Now I want to draw a path relative to this element. How should I do?
If I write something like:

var c = paper.path("M 18.00,79.75 C 18.00,79.50 52.50,79.75
52.50,79.75...");
The path is being created relative to the parent container, and
doesn't take the proper position over my image. Thanks for your
support
Reply all
Reply to author
Forward
0 new messages