summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-10-12 19:00:15 +0200
committerSven Gothel <[email protected]>2013-10-12 19:00:15 +0200
commit2634ce35031be322cb355e4d6055aace6a2c0619 (patch)
treee619f79a9fc582418679ba6db5a120cf9a50a2da /src/newt/classes/com
parentc5d5e09714875770c5287db8c5e44b84e95aec62 (diff)
Bug 859: Let TileRenderer detect zero columns and rows in eot() where beginTile() throws an EOT IllegalStateException to avoid division by zero
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r--src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
index 86faea35f..73b3bc368 100644
--- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
+++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
@@ -598,16 +598,22 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
final Graphics2D g2d = (Graphics2D)graphics;
try {
printAWTTiles.setupGraphics2DAndClipBounds(g2d, getWidth(), getHeight());
- try {
- final TileRenderer tileRenderer = printAWTTiles.renderer;
- if( DEBUG ) {
- System.err.println("AWT print.0: "+tileRenderer);
+ final TileRenderer tileRenderer = printAWTTiles.renderer;
+ if( DEBUG ) {
+ System.err.println("AWT print.0: "+tileRenderer);
+ }
+ if( !tileRenderer.eot() ) {
+ try {
+ do {
+ tileRenderer.display();
+ } while ( !tileRenderer.eot() );
+ if( DEBUG ) {
+ System.err.println("AWT print.1: "+printAWTTiles);
+ }
+ tileRenderer.reset();
+ } finally {
+ printAWTTiles.resetGraphics2D();
}
- do {
- tileRenderer.display();
- } while ( !tileRenderer.eot() );
- } finally {
- printAWTTiles.resetGraphics2D();
}
} catch (NoninvertibleTransformException nte) {
System.err.println("Catched: Inversion failed of: "+g2d.getTransform());