use of org.apache.poi.hslf.model.ShapeGroup in project activityinfo by bedatadriven.
the class PPTChartRenderer method render.
public void render(PivotChartReportElement element, SlideShow ppt) throws IOException {
// add first slide
Slide slide = ppt.createSlide();
// define position of the drawing in the slide
Dimension pageSize = ppt.getPageSize();
Dimension chartSize = new Dimension((int) (pageSize.getWidth() - 72), (int) (pageSize.getHeight() - 183));
Rectangle bounds = new com.google.code.appengine.awt.Rectangle(new Point(36, 126), chartSize);
ShapeGroup group = new ShapeGroup();
group.setAnchor(bounds);
slide.addShape(group);
Graphics2D graphics = new PPGraphics2D(group);
ChartRendererJC jc = new ChartRendererJC();
jc.render(element, false, graphics, (int) chartSize.getWidth(), (int) chartSize.getHeight(), 72);
}
Aggregations