【文件属性】:
文件名称:simg:用于转换SVG => PNG和其他操作JavaScript类
文件大小:8KB
文件格式:ZIP
更新时间:2021-05-17 03:22:42
JavaScript
simg
小型SVG到图像转换器。 在浏览器或PhantomJS中工作。
使用
var simg = new Simg ( svgElement ) ;
// Replace the current SVG with an image version of it.
simg . replace ( ) ;
// And trigger a download of the rendered image.
simg . download ( ) ;
现场例子
此存储库中的示例页面也位于
安装
您可以通过以下三种方式在您的项目中安装此代码:
克隆此git repo。
bower install simg
直接下载最新的或src。
文献资料
实例方法
Simg.toString(svg) -将SVG返回为HTML内容。 内部使用。
Simg.toCanvas(cb)
【文件预览】:
simg-master
----.jshintrc(229B)
----bower.json(543B)
----Gruntfile.js(918B)
----src()
--------simg.js(4KB)
----example()
--------index.html(2KB)
----LICENSE(1KB)
----README.md(3KB)
----dist()
--------simg.min.js(2KB)
----.gitignore(26B)
----package.json(751B)