src/solaris/classes/sun/java2d/xr/XRUtils.java

Print this page

        

@@ -24,10 +24,11 @@
  */
 
 package sun.java2d.xr;
 
 import java.awt.*;
+import java.awt.geom.AffineTransform;
 import java.awt.MultipleGradientPaint.*;
 import java.awt.image.*;
 import sun.java2d.loops.*;
 import static java.awt.AlphaComposite.*;
 

@@ -256,6 +257,23 @@
     }
 
     public static int clampToUShort(int x) {
         return (x > 65535 ? 65535 : (x < 0) ? 0 : x);
     }
+    
+    public static boolean isTransformQuadrantRotated(AffineTransform tr) {
+         return ((tr.getType() & (AffineTransform.TYPE_GENERAL_ROTATION |
+                 AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0);
+    }
+    
+    public static boolean isMaskEvaluated(byte xrCompRule) {
+        switch (xrCompRule) {
+        case PictOpOver:
+        case PictOpOverReverse:
+        case PictOpAtop:
+        case PictOpXor:
+            return true;
+        }
+
+        return false;
+    }
 }