Package at.bestsolution.efxclipse.formats.svg.svg

Examples of at.bestsolution.efxclipse.formats.svg.svg.SvgSvgElement


import at.bestsolution.efxclipse.formats.svg.svg.SvgSvgElement;

public class SVGStreamConverter {
  public void converter(InputStream inputStream, OutputStream outputStream) throws Exception {
    XMLLoader loader = new XMLLoader();
    SvgSvgElement rootElement = loader.loadDocument(null, inputStream);
    FXMLConverter converter = new FXMLConverter(rootElement);
    outputStream.write(converter.generate().toString().getBytes());
  }
View Full Code Here


    }
   
    File outFile = new File(toFile);
   
    XMLLoader l = new XMLLoader();
    SvgSvgElement svgRoot = l.loadDocument(outFile.getAbsolutePath(), in);
    FXMLConverter converter = new FXMLConverter(svgRoot);
    FileOutputStream out = new FileOutputStream(outFile);
    out.write(converter.generate().toString().getBytes());
    out.close();
  }
View Full Code Here

        in = f.toURI().toURL().openStream();
      }
     
     
      // TODO use workspace file
      SvgSvgElement g = l.loadDocument("/Users/tomschindl/git/e-fx-clipse/at.bestsolution.efxclipse.formats.svg/samples/test.fxml",in);
//      SvgSvgElement g = l.loadDocument(new File("/Users/tomschindl/git/e-fx-clipse/at.bestsolution.efxclipse.formats.svg/samples/w3/images/shapes/rect01.svg").toURL().openStream());
//      SvgSvgElement g = l.loadDocument(new File("/Users/tomschindl/git/e-fx-clipse/at.bestsolution.efxclipse.formats.svg/samples/w3/images/filters/filters01.svg").toURL().openStream());
      FXMLConverter c = new FXMLConverter(g);
      String fxmlData = c.generate().toString();
      // TODO use workspace file
View Full Code Here

  @Override
  protected String convert(IFile outFile, IFile file) throws ExecutionException {
    try {
      XMLLoader loader = new XMLLoader();
      SvgSvgElement root = loader.loadDocument(outFile.getFullPath().toOSString(), file.getContents());
      return new FXMLConverter(root).generate().toString();
    } catch (Exception e) {
      throw new ExecutionException("Conversion failed", e);
    }
  }
View Full Code Here

TOP

Related Classes of at.bestsolution.efxclipse.formats.svg.svg.SvgSvgElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.