src/share/classes/java/awt/image/AffineTransformOp.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -108,27 +108,27 @@
         validateTransform(xform);
         this.xform = (AffineTransform) xform.clone();
         this.hints = hints;
 
         if (hints != null) {
-            Object value = hints.get(hints.KEY_INTERPOLATION);
+            Object value = hints.get(RenderingHints.KEY_INTERPOLATION);
             if (value == null) {
-                value = hints.get(hints.KEY_RENDERING);
-                if (value == hints.VALUE_RENDER_SPEED) {
+                value = hints.get(RenderingHints.KEY_RENDERING);
+                if (value == RenderingHints.VALUE_RENDER_SPEED) {
                     interpolationType = TYPE_NEAREST_NEIGHBOR;
                 }
-                else if (value == hints.VALUE_RENDER_QUALITY) {
+                else if (value == RenderingHints.VALUE_RENDER_QUALITY) {
                     interpolationType = TYPE_BILINEAR;
                 }
             }
-            else if (value == hints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR) {
+            else if (value == RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR) {
                 interpolationType = TYPE_NEAREST_NEIGHBOR;
             }
-            else if (value == hints.VALUE_INTERPOLATION_BILINEAR) {
+            else if (value == RenderingHints.VALUE_INTERPOLATION_BILINEAR) {
                 interpolationType = TYPE_BILINEAR;
             }
-            else if (value == hints.VALUE_INTERPOLATION_BICUBIC) {
+            else if (value == RenderingHints.VALUE_INTERPOLATION_BICUBIC) {
                 interpolationType = TYPE_BICUBIC;
             }
         }
         else {
             interpolationType = TYPE_NEAREST_NEIGHBOR;

@@ -233,14 +233,16 @@
             if (srcCM.getColorSpace().getType() !=
                 dstCM.getColorSpace().getType())
             {
                 int type = xform.getType();
                 boolean needTrans = ((type&
-                                      (xform.TYPE_MASK_ROTATION|
-                                       xform.TYPE_GENERAL_TRANSFORM))
+                                      (AffineTransform.TYPE_MASK_ROTATION|
+                                       AffineTransform.TYPE_GENERAL_TRANSFORM))
                                      != 0);
-                if (! needTrans && type != xform.TYPE_TRANSLATION && type != xform.TYPE_IDENTITY)
+                if (! needTrans &&
+                    type != AffineTransform.TYPE_TRANSLATION &&
+                    type != AffineTransform.TYPE_IDENTITY)
                 {
                     double[] mtx = new double[4];
                     xform.getMatrix(mtx);
                     // Check out the matrix.  A non-integral scale will force ARGB
                     // since the edge conditions can't be guaranteed.