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
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: Tue Mar 19 10:24:16 GMT 2024

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

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

Back to the top