How to use the svgexport.render function in svgexport

To help you get started, we’ve selected a few svgexport examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kazunori-Kimura / electron-viz / lib / js / Viz.js View on Github external
toPNG(filepath, callback) {
    if (this.svg) {
      const svgFile = this.save(filepath);
      const filename = filepath.replace(/\.dot$/, ".png");

      svgexport.render([{
        input: [svgFile],
        output:  [filename]
      }], function(){
        callback(filename);
      });
    }

    return "error.";
  }

svgexport

Node.js module and command-line tool for exporting SVG to PNG and JPEG.

MIT
Latest version published 4 years ago

Package Health Score

45 / 100
Full package analysis

Popular svgexport functions