Package com.googlecode.jsonwebservice.attachment

Examples of com.googlecode.jsonwebservice.attachment.Size


      throw new Error(e);
    }
  }

  private BufferedImage getBufferedImage(JFreeChart chart, ChartConfig config) {
    Size size = config.getSize();
    int zoomLevel = size.getZoomLevel() > 0 ? size.getZoomLevel() : 1;
    int viewboxWidth = size.getWidth() / zoomLevel;
    int viewboxHeight = size.getHeight() / zoomLevel;
    return chart.createBufferedImage(viewboxWidth, viewboxHeight,
        BufferedImage.TYPE_INT_RGB, null);
  }
View Full Code Here


        null);
    // Create an instance of the SVG Generator
    SVGGraphics2D svgGenerator = new SVGGraphics2D(document);

    // Ask the chart to render into the SVG Graphics2D implementation
    Size size = config.getSize();
    int zoomLevel = size.getZoomLevel() > 0 ? size.getZoomLevel() : 1;
    int viewboxWidth = size.getWidth() / zoomLevel;
    int viewboxHeight = size.getHeight() / zoomLevel;
    int chartWidth = viewboxWidth - (60 / zoomLevel);
    int chartHeight = viewboxHeight - (28 / zoomLevel);

    chart.draw(svgGenerator, new Rectangle2D.Double(10, 10, chartWidth,
        chartHeight), null);
View Full Code Here

TOP

Related Classes of com.googlecode.jsonwebservice.attachment.Size

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.