diff options
author | Sven Gothel <[email protected]> | 2013-09-08 19:51:21 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-09-08 19:51:21 +0200 |
commit | badc13213bcf952830afe606ba71683540aba5a3 (patch) | |
tree | 6749ee1514ce8ebb0321d146267048062558185e /src/jogl | |
parent | fb6440fb6e4fac31d03799d5cf804d02c78f2c38 (diff) |
AWTPrintLifecycle: Add DEFAULT_PRINT_TILE_SIZE (512); Remove unused imports.
Diffstat (limited to 'src/jogl')
3 files changed, 5 insertions, 12 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/AWTPrintLifecycle.java b/src/jogl/classes/javax/media/opengl/awt/AWTPrintLifecycle.java index 301e18722..1a4c5bac0 100644 --- a/src/jogl/classes/javax/media/opengl/awt/AWTPrintLifecycle.java +++ b/src/jogl/classes/javax/media/opengl/awt/AWTPrintLifecycle.java @@ -70,6 +70,9 @@ import jogamp.nativewindow.awt.AWTMisc; */ public interface AWTPrintLifecycle { + public static final int DEFAULT_PRINT_TILE_SIZE = 512; + + /** * Shall be called before {@link Component#print(Graphics)}. * <p> diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index 8745a8d24..047c94b58 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -54,16 +54,12 @@ import java.awt.Graphics2D; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.RenderingHints; -import java.awt.geom.AffineTransform; import java.awt.geom.Rectangle2D; import java.awt.EventQueue; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; -import java.util.Map.Entry; -import java.util.Set; import javax.media.nativewindow.AbstractGraphicsConfiguration; import javax.media.nativewindow.OffscreenLayerOption; @@ -728,7 +724,6 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing paint(g); } - private static final int PRINT_TILE_SIZE = 512; private volatile boolean printActive = false; private boolean printUseAA = false; private GLAnimatorControl printAnimator = null; @@ -793,7 +788,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing } } final GLDrawableFactory factory = GLDrawableFactory.getFactory(caps.getGLProfile()); - printGLAD = factory.createOffscreenAutoDrawable(null, caps, null, PRINT_TILE_SIZE, PRINT_TILE_SIZE, null); + printGLAD = factory.createOffscreenAutoDrawable(null, caps, null, DEFAULT_PRINT_TILE_SIZE, DEFAULT_PRINT_TILE_SIZE, null); GLDrawableUtil.swapGLContextAndAllGLEventListener(GLCanvas.this, printGLAD); } diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index 44586d45b..c97d1e24f 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -49,16 +49,12 @@ import java.awt.GraphicsConfiguration; import java.awt.GraphicsEnvironment; import java.awt.Rectangle; import java.awt.RenderingHints; -import java.awt.geom.AffineTransform; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.awt.image.DataBufferInt; import java.beans.Beans; import java.nio.IntBuffer; -import java.util.Iterator; import java.util.List; -import java.util.Set; -import java.util.Map.Entry; import javax.media.nativewindow.AbstractGraphicsDevice; import javax.media.nativewindow.NativeSurface; @@ -501,7 +497,6 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing } } - private static final int PRINT_TILE_SIZE = 512; private volatile boolean printActive = false; private boolean printUseAA = false; private GLAnimatorControl printAnimator = null; @@ -565,7 +560,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing caps.setSampleBuffers(true); caps.setNumSamples(8); final GLDrawableFactory factory = GLDrawableFactory.getFactory(caps.getGLProfile()); - printGLAD = factory.createOffscreenAutoDrawable(null, caps, null, PRINT_TILE_SIZE, PRINT_TILE_SIZE, null); + printGLAD = factory.createOffscreenAutoDrawable(null, caps, null, DEFAULT_PRINT_TILE_SIZE, DEFAULT_PRINT_TILE_SIZE, null); GLDrawableUtil.swapGLContextAndAllGLEventListener(GLJPanel.this, printGLAD); } } |