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
Hi,

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);
g.scale(scale);
figure.print(g);


The problem is when the figure contains labels. Sometimes its text is cropped. Has anybody the same problem?
Previous Topic:[Draw 2d] Problem with rotation of draw2d label.
Next Topic:File chooser in the property sheet
Goto Forum:
  


Current Time: Sat Dec 20 11:31:26 GMT 2014

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

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