简体   繁体   English

如何将easyjs路径转换为svg

[英]How do I convert easejs path to svg

I have a js file created using ease.js which creates some shapes in canvas. 我有一个使用easy.js创建的js文件,该文件在画布中创建了一些形状。
But I dont want to use canvas. 但是我不想使用画布。 I want to implement it using svg. 我想使用svg实现它。

Is there a way to convert path file to svg file? 有没有办法将路径文件转换为SVG文件?

Code written using easyjs 使用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. 对于将来遇到这个问题的人:EaselJS现在在extras/目录中包含SVGExporter类。 This will export almost any EaselJS content to SVG, including vector graphics. 这会将几乎所有EaselJS内容导出到SVG,包括矢量图形。

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

you may use online SVG editor: 您可以使用在线SVG编辑器:

http://svg-edit.googlecode.com/svn/branches/2.6/editor/svg-editor.html 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. 它具有编辑源功能,因此您可以使用画布并对其进行一些更改以匹配svg语法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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