Package org.sourceforge.jlibeps.epsgraphics

Examples of org.sourceforge.jlibeps.epsgraphics.EpsGraphics2D.drawImage()


    // 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
Copyright © 2018 www.massapi.com. 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.