< prev index next >

test/java/awt/geom/AffineTransform/GetTypeOptimization.java

Print this page




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @bug 4418285
  27  * @summary Tests that transforms modified with degenerate operations
  28  *          continue to return their more optimal type from getType().
  29  *          This test also confirms that isIdentity() returns the
  30  *          optimal value under all histories of modification.
  31  * @run main GetTypeOptimization

  32  */
  33 
  34 import java.awt.geom.AffineTransform;
  35 import java.util.Random;
  36 
  37 public class GetTypeOptimization {
  38     static int TYPE_IDENTITY          = AffineTransform.TYPE_IDENTITY;
  39     static int TYPE_TRANSLATION       = AffineTransform.TYPE_TRANSLATION;
  40     static int TYPE_UNIFORM_SCALE     = AffineTransform.TYPE_UNIFORM_SCALE;
  41     static int TYPE_GENERAL_SCALE     = AffineTransform.TYPE_GENERAL_SCALE;
  42     static int TYPE_FLIP              = AffineTransform.TYPE_FLIP;
  43     static int TYPE_QUADRANT_ROTATION = AffineTransform.TYPE_QUADRANT_ROTATION;
  44     static int TYPE_GENERAL_ROTATION  = AffineTransform.TYPE_GENERAL_ROTATION;
  45     static int TYPE_GENERAL_TRANSFORM = AffineTransform.TYPE_GENERAL_TRANSFORM;
  46 
  47     public static Random rand = new Random();
  48 
  49     public static boolean verbose;
  50     public static int numerrors;
  51 




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @bug 4418285
  27  * @summary Tests that transforms modified with degenerate operations
  28  *          continue to return their more optimal type from getType().
  29  *          This test also confirms that isIdentity() returns the
  30  *          optimal value under all histories of modification.
  31  * @run main GetTypeOptimization
  32  * @key randomness
  33  */
  34 
  35 import java.awt.geom.AffineTransform;
  36 import java.util.Random;
  37 
  38 public class GetTypeOptimization {
  39     static int TYPE_IDENTITY          = AffineTransform.TYPE_IDENTITY;
  40     static int TYPE_TRANSLATION       = AffineTransform.TYPE_TRANSLATION;
  41     static int TYPE_UNIFORM_SCALE     = AffineTransform.TYPE_UNIFORM_SCALE;
  42     static int TYPE_GENERAL_SCALE     = AffineTransform.TYPE_GENERAL_SCALE;
  43     static int TYPE_FLIP              = AffineTransform.TYPE_FLIP;
  44     static int TYPE_QUADRANT_ROTATION = AffineTransform.TYPE_QUADRANT_ROTATION;
  45     static int TYPE_GENERAL_ROTATION  = AffineTransform.TYPE_GENERAL_ROTATION;
  46     static int TYPE_GENERAL_TRANSFORM = AffineTransform.TYPE_GENERAL_TRANSFORM;
  47 
  48     public static Random rand = new Random();
  49 
  50     public static boolean verbose;
  51     public static int numerrors;
  52 


< prev index next >