Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Importing SVG into RaphaelJS
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  19 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
xwisdom  
View profile  
 More options Oct 18, 3:10 pm
From: xwisdom <xwis...@gmail.com>
Date: Sat, 17 Oct 2009 22:10:59 -0700 (PDT)
Local: Sun, Oct 18 2009 3:10 pm
Subject: Importing SVG into RaphaelJS
Hello,

Is it possible to import an SVG file into RaphaelJS? If not, are there
any plans to do this?

For example:

paper.importSVG('path/to/image.svg');
image = paper.getElementById('mysvg'); // get svg object by id
// code to animate image

PS I've noticed that SVG can be imported using BURSTEngine -
http://hyper-metrix.com/#Burst


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
xwisdom  
View profile  
 More options Oct 18, 3:10 pm
From: xwisdom <xwis...@gmail.com>
Date: Sat, 17 Oct 2009 22:10:58 -0700 (PDT)
Local: Sun, Oct 18 2009 3:10 pm
Subject: Importing SVG into RaphaelJS
Hello,

Is it possible to import an SVG file into RaphaelJS? If not, are there
any plans to do this?

For example:

paper.importSVG('path/to/image.svg');
image = paper.getElementById('mysvg'); // get svg object by id
// code to animate image

PS I've noticed that SVG can be imported using BURSTEngine -
http://hyper-metrix.com/#Burst


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
charles thomas  
View profile  
 More options Oct 19, 9:33 am
From: charles thomas <charles...@yahoo.com>
Date: Sun, 18 Oct 2009 16:33:42 -0700 (PDT)
Local: Mon, Oct 19 2009 9:33 am
Subject: Re: Importing SVG into RaphaelJS

Well the most it could extract, that would be immediately useful, would be the path defined in the SVG file being imported.

Thats only been possible since a recent release of Raphael that supports SVG path syntax 100%.

After that it would have to interpret attributes in the SVG file and convert them into the Raphael equivalent.

It seems unlikely anyone would write the whole "import" capability except maybe a plugins for importing the path.

--- On Sat, 10/17/09, xwisdom <xwis...@gmail.com> wrote:

From: xwisdom <xwis...@gmail.com>
Subject: Importing SVG into RaphaelJS
To: "Raphaël" <raphaeljs@googlegroups.com>
Received: Saturday, October 17, 2009, 10:10 PM

Hello,

Is it possible to import an SVG file into RaphaelJS? If not, are there
any plans to do this?

For example:

paper.importSVG('path/to/image.svg');
image = paper.getElementById('mysvg'); // get svg object by id
// code to animate image

PS I've noticed that SVG can be imported using BURSTEngine -
http://hyper-metrix.com/#Burst

      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!

http://www.flickr.com/gift/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JesseFrye  
View profile  
 More options Oct 23, 4:20 pm
From: JesseFrye <teaml...@gmail.com>
Date: Thu, 22 Oct 2009 23:20:58 -0700 (PDT)
Local: Fri, Oct 23 2009 4:20 pm
Subject: Re: Importing SVG into RaphaelJS
Use Illustrator to draw your file and then save as an SVG file.
At the Save As dialog box click Show code.
You can copy the coordinates and paste them into your JS code.
You will need to replace the "," (commas) with a space though.

On Oct 18, 4:33 pm, charles thomas <charles...@yahoo.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry Baranovskiy  
View profile  
 More options Oct 23, 4:34 pm
From: Dmitry Baranovskiy <dmitry.baranovs...@gmail.com>
Date: Fri, 23 Oct 2009 17:34:15 +1100
Local: Fri, Oct 23 2009 4:34 pm
Subject: Re: Importing SVG into RaphaelJS
> You will need to replace the "," (commas) with a space though.

Why?

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wout.  
View profile  
 More options Oct 23, 11:42 pm
From: "Wout." <i...@qimmiq.net>
Date: Fri, 23 Oct 2009 06:42:17 -0700 (PDT)
Local: Fri, Oct 23 2009 11:42 pm
Subject: Re: Importing SVG into RaphaelJS
Soon I will have a full SCG to Raphaeljs available.
It is able to detect all object types and the polygon objects will
neatly converted to a raphael path.

I'm currently still working on the convertion of SVG groups to Raphael
sets.
I guess in a week or two I will release the code on Github.

On 18 Oct, 07:10, xwisdom <xwis...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josepssv  
View profile  
 More options Oct 25, 7:24 pm
From: Josepssv <josep....@gmail.com>
Date: Sun, 25 Oct 2009 01:24:08 -0700 (PDT)
Local: Sun, Oct 25 2009 7:24 pm
Subject: Re: Importing SVG into RaphaelJS
Dojo Parser
http://aclindsay.com/svgparser/
Convert to Dojo 'dojox.gfx' format from SVG

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josepssv  
View profile  
 More options Oct 25, 7:38 pm
From: Josepssv <josep....@gmail.com>
Date: Sun, 25 Oct 2009 01:38:12 -0700 (PDT)
Local: Sun, Oct 25 2009 7:38 pm
Subject: Re: Importing SVG into RaphaelJS
SVG to dojox.gfx Convertor
http://sourceforge.net/projects/svgtodojoxgfx/
and forum
http://aclindsay.com/home/?p=18

On 23 oct, 13:42, "Wout." <i...@qimmiq.net> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josepssv  
View profile   Translate to Translated (View Original)
 More options Oct 24, 11:53 am
From: Josepssv <josep....@gmail.com>
Date: Fri, 23 Oct 2009 18:53:31 -0700 (PDT)
Local: Sat, Oct 24 2009 11:53 am
Subject: Re: Importing SVG into RaphaelJS
Sencillo usando Mozilla Firefox, Chrome,.. pero no IExplorer, eso
parece complicado.
Implementé algo así
SVG to OPF (Onlypaths Format, JSON code format for SVG)
http://onlypaths.com/aaopblog/2009/2/26/index.htm
Es interesante tener un formato propio que use JSON como sugirió
Antimatter15, también para Raphaeljs

Wout puedo ayudar?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josepssv  
View profile  
 More options Oct 24, 6:53 am
From: Josepssv <josep....@gmail.com>
Date: Fri, 23 Oct 2009 13:53:33 -0700 (PDT)
Local: Sat, Oct 24 2009 6:53 am
Subject: Re: Importing SVG into RaphaelJS
Wout, I collaborate
http://onlypaths.com/aaopblog/2009/2/26/index.htm
SVG to OPF (Onlypaths Format) JSON code
Onlypaths will Raphael

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wout.  
View profile  
 More options Oct 26, 10:54 pm
From: "Wout." <i...@qimmiq.net>
Date: Mon, 26 Oct 2009 04:54:10 -0700 (PDT)
Local: Mon, Oct 26 2009 10:54 pm
Subject: Re: Importing SVG into RaphaelJS
@Josepssv

No pudo abrir el página de onlypaths.
Hablas inglés?

On 23 Oct, 21:53, Josepssv <josep....@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josepssv  
View profile  
 More options Oct 28, 12:12 am
From: Josepssv <josep....@gmail.com>
Date: Tue, 27 Oct 2009 06:12:36 -0700 (PDT)
Local: Wed, Oct 28 2009 12:12 am
Subject: Re: Importing SVG into RaphaelJS
Wout:
Prefiero contestar en español.
Hay opción de traducir

Usar Firefox.
Documento SVG prohibido en IExplorer.

On 26 oct, 13:54, "Wout." <i...@qimmiq.net> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wout.  
View profile   Translate to Translated (View Original)
 More options Oct 28, 2:27 am
From: "Wout." <i...@qimmiq.net>
Date: Tue, 27 Oct 2009 08:27:14 -0700 (PDT)
Local: Wed, Oct 28 2009 2:27 am
Subject: Re: Importing SVG into RaphaelJS
No, estaba Safari.
El documento SVG esta demasiado grande por Safari creo.

Pero en Firefox lo puedo abrir.
Me parece un mejor solución que tengo ahora.

On 27 Oct, 14:12, Josepssv <josep....@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry Baranovskiy  
View profile  
 More options Oct 28, 9:32 am
From: Dmitry Baranovskiy <dmitry.baranovs...@gmail.com>
Date: Wed, 28 Oct 2009 09:32:16 +1100
Local: Wed, Oct 28 2009 9:32 am
Subject: Re: Importing SVG into RaphaelJS
Guys, you are not alone on this list. Please speak English or send
each other direct messages.

2009/10/28 Wout. <i...@qimmiq.net>:

--
Best regards,
Dmitry Baranovskiy
http://dmitry.baranovskiy.com

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
cartographer  
View profile  
 More options Oct 27, 7:34 pm
From: cartographer <fbuchin...@gmail.com>
Date: Tue, 27 Oct 2009 01:34:32 -0700 (PDT)
Local: Tues, Oct 27 2009 7:34 pm
Subject: Re: Importing SVG into RaphaelJS
@Josepssv:

It is still not clear to me how I can load the OPF data generated with
your converter object in Raphael.

when I do

var opfData = [{id:"svg2", type:"doc", left:0, top:0,
etc:"[...]"}]; // data generated by OPF converter (abbreviated)
var c = paper.path(opfData);

on the Raphael playground page(http://raphaeljs.com/playground.html),
I get the alert error "S[0] is not defined".

Any hints?

Franz

On 26 Okt., 12:54, "Wout." <i...@qimmiq.net> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josepssv  
View profile  
 More options Oct 30, 8:33 pm
From: Josepssv <josep....@gmail.com>
Date: Fri, 30 Oct 2009 02:33:39 -0700 (PDT)
Local: Fri, Oct 30 2009 8:33 pm
Subject: Re: Importing SVG into RaphaelJS
No, Cartographer
I will convert OPF to Raphaeljs
I work

On 27 oct, 09:34, cartographer <fbuchin...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JesseFrye  
View profile  
 More options Nov 2, 1:54 pm
From: JesseFrye <teaml...@gmail.com>
Date: Sun, 1 Nov 2009 18:54:38 -0800 (PST)
Local: Mon, Nov 2 2009 1:54 pm
Subject: Re: Importing SVG into RaphaelJS
You're right. I must have had a syntax issue when I first started
playing with it. Commas seem fine right now.

On Oct 22, 11:34 pm, Dmitry Baranovskiy <dmitry.baranovs...@gmail.com>
wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josepssv  
View profile  
 More options Nov 11, 3:22 pm
From: Josepssv <josep....@gmail.com>
Date: Tue, 10 Nov 2009 20:22:08 -0800 (PST)
Local: Wed, Nov 11 2009 3:22 pm
Subject: Re: Importing SVG into RaphaelJS
Completad SVG to OPF to Raphaeljs
http://onlypaths.com/aaopblog/2009/11/7/

Only paths, jeje

On 30 oct, 09:33, Josepssv <josep....@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brother Erryn  
View profile  
 More options Nov 12, 6:25 am
From: Brother Erryn <brotherer...@atomicmonks.com>
Date: Wed, 11 Nov 2009 11:25:07 -0800 (PST)
Local: Thurs, Nov 12 2009 6:25 am
Subject: Re: Importing SVG into RaphaelJS
I submitted a post to do this, but it hasn't made it through
moderation (yet? ever?). It doesn't cover everything, but does quite a
lot. It also uses jQuery to make parts simpler. If you aren't
supporting IE, you can remove the parseXML function/reference and
change the $.get type from 'text' to 'xml':

function parseXML( xml ) {
        if( window.ActiveXObject && window.GetObject ) {
                var dom = new ActiveXObject( 'Microsoft.XMLDOM' );
                dom.loadXML( xml );
                return dom;
        }
        if( window.DOMParser )
                return new DOMParser().parseFromString( xml, 'text/xml' );
        throw new Error( 'No XML parser available' );

}

$(function(){
        $.get('demo.svg', null, function(doc){ // or 'demo.svg'
                doc = parseXML(doc);
                var root = $(doc).find('svg')[0],
                        vb = root.getAttribute('viewBox'), dims = vb ? vb.split(' ') :
[0,0,root.getAttribute('width'),root.getAttribute('height')];

                var img = Raphael(parseFloat(dims[0]), parseFloat(dims[1]),
parseFloat(dims[2]), parseFloat(dims[3]));

                $(root).find('path').each(function(){
                        var node = this, path = img.path($(this).attr('d'));
                        $(['stroke-linejoin','stroke','stroke-miterlimit','stroke-
width','fill','stroke-linecap']).each(function(){
                                if($(node).attr(this.toString()))
                                        path.attr(this, $(node).attr(this.toString()));
                        });

                        if($(node).attr('style')) {
                                var atts = $(node).attr('style').split(';');
                                for(var i=0;i<atts.length;i++) {
                                        var bits = atts[i].split(':');
                                        path.attr(bits[0],bits[1]);
                                }
                        }
                        /*path.scale(0.5, 0.5);
                        var box = path.getBBox(), x=box.x+box.width/2.0, y = box.y
+box.height/2.0;
                        path.translate(x*0.5-x, y*0.5-y);*/
                });

        }, 'text');

});

On Nov 10, 10:22 pm, Josepssv <josep....@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google