Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Scaled SWTGraphics draws
Scaled SWTGraphics draws [message #757172] Wed, 16 November 2011 22:16
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member

I would like to save my IFigure tree as a .png image. This image is then used in a BIRT report where all images have 300 DPI resolution.

So I do something like this:
double scale = 300 / Display.getDefault().getDPI().y;
Image image = new Image(Display.getDefault(), figure.getSize().width * scale, figure.getSize().heigth * scale);
GC gc = new GC(image);
Graphics g = new SWTGraphics(gc);

The problem is when the figure contains labels. Sometimes its text is cropped. Has anybody the same problem?
Previous Topic:Adding Color to Shapes via Property in GEF BPMN 2 Editor
Next Topic:Eclipse does not close until GEF editor is closed
Goto Forum:

Current Time: Thu Oct 21 08:33:20 GMT 2021

Powered by FUDForum. Page generated in 0.01736 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top