diff options
author | Sven Gothel <[email protected]> | 2013-09-15 23:46:35 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-09-15 23:46:35 +0200 |
commit | efa8a7927eb8c69e45787d15306e172e440c6150 (patch) | |
tree | 85e1bc379f17ee30378827585284306343b2569f | |
parent | c2ce31e11eefcf1b900c0e9b41264f5d5566dc46 (diff) |
Updating doc AWTPrinting.txt
-rw-r--r-- | doc/Implementation/AWTPrinting.txt | 20 | ||||
-rw-r--r-- | src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java | 1 |
2 files changed, 14 insertions, 7 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' +++ diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java index a54f6bac6..65e5ab3f0 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTPrintLifecycle.java @@ -51,7 +51,6 @@ import jogamp.nativewindow.awt.AWTMisc; * on all {@link AWTPrintLifecycle} elements in the {@link Container}.<br> * To minimize this burden, a user can use {@link Context#setupPrint(Container, double, double, int) Context.setupPrint(..)}: * <pre> - * Graphics2D g2d; * Container cont; * double scaleGLMatXY = 72.0/glDPI; * int numSamples = 0; // leave multisampling as-is |