aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-09-15 23:46:35 +0200
committerSven Gothel <[email protected]>2013-09-15 23:46:35 +0200
commitefa8a7927eb8c69e45787d15306e172e440c6150 (patch)
tree85e1bc379f17ee30378827585284306343b2569f /doc
parentc2ce31e11eefcf1b900c0e9b41264f5d5566dc46 (diff)
Updating doc AWTPrinting.txt
Diffstat (limited to 'doc')
-rw-r--r--doc/Implementation/AWTPrinting.txt20
1 files changed, 14 insertions, 6 deletions
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:
- <http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/classes/javax/media/opengl/awt/AWTPrintLifecycle.java;hb=HEAD>
+ <http://jogamp.org/git/?p=jogl.git;a=blob;f=src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java;hb=HEAD>
GLCanvas:
<http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/classes/javax/media/opengl/awt/GLCanvas.java;hb=HEAD#l731>
...
@@ -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'
+++