Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [chemclipse-dev] The overlap problem of plotarea and axis in ChromatogramEditor when printing

Thanks :-)
I'll take this into account when doing a refactoring of the plotting library.


Best,
Philip

Am 13.04.2017 um 15:29 schrieb 恒雨*流星↙ :
Hi all,

When I print the chromatogram, I found that the plotarea and axis overlap especially called draw2d.SWTGraphics.scale(). The code is shown below:

Printer printer = new Printer(printerdata);
GC gc = new GC(printer);
if (printer.startJob("pdf")) {
     printer.startPage();

     Point screenDPI = Display.getCurrent().getDPI();
     Point printerDPI = printer.getDPI();
float scaleFactorX = printerDPI.x * 1.0f / screenDPI.x;
float scaleFactorY = printerDPI.y * 1.0f / screenDPI.y;

SWTGraphics graphics = new SWTGraphics(gc);
graphics.setLineAttributes(new LineAttributes(1.0f));

graphics.scale(scaleFactorX, scaleFactorY);

ChromatogramEditorMSD.chromatogramUI.print(gc);

graphics.dispose();
gc.dispose();
printer.endPage();
}
printer.endJob();
printer.dispose();

Best regards,

Y.M Zhou


_______________________________________________
chemclipse-dev mailing list
chemclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/chemclipse-dev

-- 
~~~~~~~~~~~~~~~~~~~~~~~~
OpenChrom - the open source alternative for chromatography / mass spectrometry
Dr. Philip Wenig » Founder » philip.wenig@xxxxxxxxxxxxx » http://www.openchrom.net
~~~~~~~~~~~~~~~~~~~~~~~~

Back to the top