summaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-09-28 04:03:04 +0200
committerSven Gothel <[email protected]>2013-09-28 04:03:04 +0200
commitfe284b515d984198fdbe702837809f181625a457 (patch)
treeec20c43590c43ad185cbaca8119a66c8ba664615 /src/test/com
parentc8abb9d2c9a8c92f0c5c42aba13e3e80c69739dc (diff)
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.
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java13
1 files changed, 13 insertions, 0 deletions
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();
}