/** Constructor */ public Regression_152033() { final PluginSettings ps = PluginSettings.instance(); try { dRenderer = ps.getDevice("dv.JPG"); // $NON-NLS-1$ } catch (ChartException ex) { ex.printStackTrace(); } cm = createDateTimeScatter(); BufferedImage img = new BufferedImage(600, 600, BufferedImage.TYPE_INT_ARGB); Graphics g = img.getGraphics(); Graphics2D g2d = (Graphics2D) g; dRenderer.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT, g2d); dRenderer.setProperty(IDeviceRenderer.FILE_IDENTIFIER, this.getClassFolder2()); // $NON-NLS-1$ Bounds bo = BoundsImpl.create(0, 0, 600, 600); bo.scale(72d / dRenderer.getDisplayServer().getDpiResolution()); Generator gr = Generator.instance(); try { gcs = gr.build(dRenderer.getDisplayServer(), cm, bo, null, null, null); gr.render(dRenderer, gcs); } catch (ChartException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
/* * (non-Javadoc) * * @see org.eclipse.birt.chart.event.PrimitiveRenderEvent#draw(org.eclipse.birt.chart.device.IDeviceRenderer) */ public final void draw(IDeviceRenderer idr) throws ChartException { idr.drawRectangle(this); }
/* * (non-Javadoc) * * @see org.eclipse.birt.chart.event.PrimitiveRenderEvent#fill(org.eclipse.birt.chart.device.IDeviceRenderer) */ public final void fill(IDeviceRenderer idr) throws ChartException { idr.fillRectangle(this); }