Package org.sourceforge.jlibeps.epsgraphics

Examples of org.sourceforge.jlibeps.epsgraphics.EpsGraphics2D


    // Within jlibeps, graphics are defined using 72 DPI (72/2.54=28,3465 PPC), but latexdraw uses 50 PPC.
    // That's why, we need the scale the graphics to have a 50 PPC eps picture.
    final double scale = 72. / PSTricksConstants.INCH_VAL_CM / IShape.PPC;// 72 DPI / 2.54 / 50 PPC
    try(FileOutputStream finalImage = new FileOutputStream(file)){
      final EpsGraphics2D g = new EpsGraphics2D("LaTeXDrawPicture", finalImage, 0, 0, (int)(getWidth()*scale), (int)(getHeight()*scale));//$NON-NLS-1$
      g.scale(scale, scale);
      g.drawImage(image, 0, 0, null);
      g.flush();
      g.close();
    }
  }
View Full Code Here

TOP

Related Classes of org.sourceforge.jlibeps.epsgraphics.EpsGraphics2D

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.