Converting an SVG file to a paper.add() Json

1,086 views
Skip to first unread message

Damien A

unread,
Feb 11, 2012, 2:20:25 PM2/11/12
to Raphaël
Hi there.
I'm currently looking for an easy way to translate an SVG file to
Raphael. The method used in the Tiger example seems nice:
http://raphaeljs.com/tiger.html

It make use of the 3rd way of init Raphael (http://raphaeljs.com/
reference.html#Raphael).
The tiger.js file is mainly a Json given to Paper.add (http://
raphaeljs.com/reference.html#Paper.add).

My question is "how can I get this Json list from an SVG file"?

Is there any converter? How can I build one?
Is there other / clever ways of displaying a graphic from an SVG
file?

Thx for your help,
Damien

charles thomas

unread,
Feb 12, 2012, 6:38:16 AM2/12/12
to raph...@googlegroups.com
Damien

One of the outputs of the converter is the Raphael JSON option.


and select Raphael JSON

Charles


From: Damien A <mobm...@gmail.com>
To: Raphaël <raph...@googlegroups.com>
Sent: Saturday, February 11, 2012 2:20:25 PM
Subject: Converting an SVG file to a paper.add() Json
--
You received this message because you are subscribed to the Google Groups "Raphaël" group.
To post to this group, send an email to raph...@googlegroups.com.
To unsubscribe from this group, send email to raphaeljs+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/raphaeljs?hl=en-GB.



Laurens Schuitemaker

unread,
May 9, 2012, 6:10:26 PM5/9/12
to raph...@googlegroups.com
Is the converter on irunmywebsite also available for use on my on hosting environment?
Thanks

charles thomas

unread,
May 9, 2012, 7:17:51 PM5/9/12
to raph...@googlegroups.com
L

This plugins for loading SVG from your server...

It has it's limitations but you might find a subset of SVG or "type" that always works.
There's also a test set there and a link to the raw latest version.
I tested the one on the above page though...

Hope it helped.


From: Laurens Schuitemaker <laurenssc...@gmail.com>
To: raph...@googlegroups.com
Sent: Wednesday, May 9, 2012 11:10:26 PM
Subject: Re: Converting an SVG file to a paper.add() Json

Is the converter on irunmywebsite also available for use on my on hosting environment?
Thanks

--
You received this message because you are subscribed to the Google Groups "Raphaël" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/raphaeljs/-/jAlgFtJKFRIJ.

Tomás Alabés

unread,
Feb 17, 2013, 11:38:23 AM2/17/13
to raph...@googlegroups.com, charles thomas

The author of the Raphael library created this tool: rappar. I linked to my forked repo because it has an important fix that the original doesn't.

Here is how to use it: tutorial

Reply all
Reply to author
Forward
0 new messages