From efa8a7927eb8c69e45787d15306e172e440c6150 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 15 Sep 2013 23:46:35 +0200 Subject: Updating doc AWTPrinting.txt --- doc/Implementation/AWTPrinting.txt | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/Implementation/AWTPrinting.txt b/doc/Implementation/AWTPrinting.txt index 97353266e..f2fcbbdd9 100644 --- a/doc/Implementation/AWTPrinting.txt +++ b/doc/Implementation/AWTPrinting.txt @@ -11,7 +11,7 @@ Unit test producing the results: Print code: AWTPrintLifecycle: - + GLCanvas: ... @@ -41,20 +41,28 @@ Impl. in GLCanvas, etc. After printing, AWTPrintLifecycle.releasePrint() shall be called. Impl. in GLCanvas .. etc. -To perform AWTPrintLifecycle on all component in one container, +To perform AWTPrintLifecycle on all components in one container decorating PrinterJob.job(), one may use: - final AWTPrintLifecycle.Context ctx = AWTPrintLifecycle.Context.setupPrint(frame, g2d, scaleGLMatXY, scaleGLMatXY); + Container cont; + double scaleGLMatXY = 72.0/glDPI; + int numSamples = 0; // leave multisampling as-is + PrinterJob job; + ... + final AWTPrintLifecycle.Context ctx = AWTPrintLifecycle.Context.setupPrint(cont, scaleGLMatXY, scaleGLMatXY, numSamples); try { AWTEDTExecutor.singleton.invoke(true, new Runnable() { public void run() { - frame.printAll(g2d); + try { + job.print(); + } catch (PrinterException ex) { + ex.printStackTrace(); + } } }); } finally { ctx.releasePrint(); } - +++ Tiled rendering is used, i.e. at print(Graphics g), @@ -75,7 +83,7 @@ TileRendererBase.TileRendererNotify interface! Bugs: - None in results - - GLCanvas: Workaround bug where onscreen MSAA cannot switch to offscreen FBO, + - GLCanvas: Workaround Bug 830 where onscreen MSAA cannot switch to offscreen FBO, i.e. stay 'onscreen' +++ -- cgit v1.2.3