简体   繁体   中英

How do I convert easejs path to svg

I have a js file created using ease.js which creates some shapes in canvas.
But I dont want to use canvas. I want to implement it using svg.

Is there a way to convert path file to svg file?

Code written using easyjs

(lib.FlashMuxSymbol = function() {
    this.initialize();

    // Layer 1
    this.shape = new cjs.Shape();
    this.shape.graphics.f().s("#000000").ss(1.5,1,1).p("ABuhcIjDghQgZAAAAAaIAACPQAAAaAZAAIDDghgAB5gYIA8AAAi0haIA8AAAi0AsIA8AAAALBCIAAA8");
    this.shape.setTransform(18.3,15.1);

    this.shape_1 = new cjs.Shape();
    this.shape_1.graphics.f("#432F26").s().p("AAfA1IAAhSIgVBSIgTAAIgVhSIAABSIgVAAIAAhpIAhAAIASBHIAThHIAgAAIAABpg");
    this.shape_1.setTransform(17.8,11.8);

    this.addChild(this.shape_1,this.shape);
}).prototype = p = new cjs.Container();
p.nominalBounds = new cjs.Rectangle(0.2,2.5,36.2,25.3);

For anyone stumbling onto this question in the future: EaselJS now includes an SVGExporter class in the extras/ directory. This will export almost any EaselJS content to SVG, including vector graphics.

https://github.com/CreateJS/EaselJS/tree/master/extras/SVGExporter

you may use online SVG editor:

http://svg-edit.googlecode.com/svn/branches/2.6/editor/svg-editor.html

it hasan edit source feature so you may take the canvas and change it a bit to match svg syntax.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM