From fe284b515d984198fdbe702837809f181625a457 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 28 Sep 2013 04:03:04 +0200 Subject: AWT Printing: releasePrint() issue reshape from AWT-EDT; GLJPanel: Issue 'handleReshape' if panelSize/awtSize mismatch, otherwise 'sendReshape' and exception if offscreen size doesn't match panelSize. --- .../opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/test/com/jogamp') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java index 8393cf978..1ec748805 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java @@ -177,6 +177,8 @@ public abstract class TiledPrintingAWTBase extends UITestCase { } } + static final boolean resizeAfterSetupPrint = false; + private void doPrintImpl(final PrintableBase printable) { final double scaleGLMatXY = 72.0 / printable.dpi; System.err.println("PRINTable: "+printable.getClass().getSimpleName()); @@ -187,7 +189,18 @@ public abstract class TiledPrintingAWTBase extends UITestCase { AWTEDTExecutor.singleton.invoke(true, new Runnable() { public void run() { try { + final int w = printable.cont.getWidth(); + final int h = printable.cont.getHeight(); + if( resizeAfterSetupPrint ) { + printable.cont.setSize(w+64, h+64); + printable.cont.validate(); + } printable.job.print(); + if( resizeAfterSetupPrint ) { + printable.cont.repaint(); + printable.cont.setSize(w, h); + printable.cont.validate(); + } } catch (PrinterException ex) { ex.printStackTrace(); } -- cgit v1.2.3