harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r602097 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java
Date Fri, 07 Dec 2007 13:33:28 GMT
Author: apetrenko
Date: Fri Dec  7 05:33:27 2007
New Revision: 602097

URL: http://svn.apache.org/viewvc?rev=602097&view=rev
Log:
Patch for HARMONY-5271 "[classlib][awt] Graphics drawArc & drawOval 
methods work incorretly in XORMode"

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java?rev=602097&r1=602096&r2=602097&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java
Fri Dec  7 05:33:27 2007
@@ -539,8 +539,8 @@
     public void drawArc(int x, int y, int width, int height, int sa, int ea) {
         if (
                 nativeLines && nativePaint &&
-                !transparentColor && simpleComposite &&
-                (transform.getType() & AffineTransform.TYPE_TRANSLATION) != 0
+                !scalingTransform && !transparentColor &&
+                simpleComposite
         ) {
             Point2D orig = new Point2D.Float(x, y);
             transform.transform(orig, orig);
@@ -552,6 +552,21 @@
                     width, height,
                     sa << 6, ea << 6
             );
+
+            if (composite instanceof XORComposite) {
+                XORComposite xor = (XORComposite)composite;
+                Color xorcolor = xor.getXORColor();
+                xSetForeground(xorcolor.getRGB());
+                x11.XDrawArc(
+                        display,
+                        drawable,
+                        gc,
+                        (int) orig.getX(), (int) orig.getY(),
+                        width, height,
+                        sa << 6, ea << 6
+                );
+                xSetForeground(fgColor.getRGB());
+            }
         } else {
             super.drawArc(x, y, width, height, sa, ea);
         }



Mime
View raw message