harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r601745 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/XGraphics2D.java
Date Thu, 06 Dec 2007 14:33:08 GMT
Author: apetrenko
Date: Thu Dec  6 06:33:07 2007
New Revision: 601745

URL: http://svn.apache.org/viewvc?rev=601745&view=rev
Log:
Patch for HARMONY-5263 "[classlib][awt] Graphics drawPolyline & 
drawPolygon 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=601745&r1=601744&r2=601745&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
Thu Dec  6 06:33:07 2007
@@ -438,6 +438,21 @@
                     X11Defs.CoordModeOrigin
             );
 
+            if (composite instanceof XORComposite) {
+                XORComposite xor = (XORComposite)composite;
+                Color xorcolor = xor.getXORColor();
+                xSetForeground(xorcolor.getRGB());
+                x11.XDrawLines(
+                        display,
+                        drawable,
+                        gc,
+                        xPoints,
+                        npoints+1,
+                        X11Defs.CoordModeOrigin
+                );
+                xSetForeground(fgColor.getRGB());
+            }
+
             Utils.memaccess.free(xPoints);
         } else {
             super.drawPolygon(xpoints, ypoints, npoints);
@@ -479,6 +494,21 @@
                     npoints,
                     X11Defs.CoordModeOrigin
             );
+
+            if (composite instanceof XORComposite) {
+                XORComposite xor = (XORComposite)composite;
+                Color xorcolor = xor.getXORColor();
+                xSetForeground(xorcolor.getRGB());
+                x11.XDrawLines(
+                        display,
+                        drawable,
+                        gc,
+                        xPoints,
+                        npoints,
+                        X11Defs.CoordModeOrigin
+                );
+                xSetForeground(fgColor.getRGB());
+            }
 
             Utils.memaccess.free(xPoints);
         } else {



Mime
View raw message