From b831ebadcaea1eea7370f7ec0bffc59eaba7a5ba Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 16 Oct 2013 14:28:27 +0200 Subject: Add efficient set(..all..) to Dimension, Insets, Point and Rectangle of NativeWindow's util types. --- src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java | 9 +++------ src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl') diff --git a/src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java index deab8bc3e..999db77a9 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java +++ b/src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java @@ -188,8 +188,7 @@ public class TileRenderer extends TileRendererBase { if( null == imageClippingDim ) { imageClippingDim = new Dimension(width, height); } else { - imageClippingDim.setWidth(width); - imageClippingDim.setHeight(height); + imageClippingDim.set(width, height); } reset(); } @@ -245,10 +244,8 @@ public class TileRenderer extends TileRendererBase { throw new IllegalArgumentException("Tile size must be > 0x0 minus 2*border"); } tileBorder = border; - tileSize.setWidth( width ); - tileSize.setHeight( height ); - tileSizeNB.setWidth( width - 2 * border ); - tileSizeNB.setHeight( height - 2 * border ); + tileSize.set( width, height ); + tileSizeNB.set( width - 2 * border, height - 2 * border ); reset(); } diff --git a/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java b/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java index d6c36aa14..0553d5673 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java +++ b/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java @@ -286,8 +286,7 @@ public abstract class TileRendererBase { * @param height The height of the final image */ public void setImageSize(int width, int height) { - imageSize.setWidth(width); - imageSize.setHeight(height); + imageSize.set(width, height); } /** @see #setImageSize(int, int) */ -- cgit v1.2.3