harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r574587 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
Date Tue, 11 Sep 2007 13:04:54 GMT
Author: apetrenko
Date: Tue Sep 11 06:04:54 2007
New Revision: 574587

URL: http://svn.apache.org/viewvc?rev=574587&view=rev
Log:
Patch for HARMONY-4772 "classlib][awt] Graphics XORMode fill doesn't work"

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java?rev=574587&r1=574586&r2=574587&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
Tue Sep 11 06:04:54 2007
@@ -20,6 +20,7 @@
  */
 package org.apache.harmony.awt.gl.windows;
 
+import java.awt.AlphaComposite;
 import java.awt.BasicStroke;
 import java.awt.Color;
 import java.awt.Dimension;
@@ -343,8 +344,10 @@
 
     @Override
     public void fill(Shape s) {
-        if (!nativeBrush) {
-            super.fill(s);
+        if (!nativeBrush || composite != AlphaComposite.SrcOver) {
+            s = transform.createTransformedShape(s);
+            MultiRectArea mra = jsr.rasterize(s, 0.5);
+            super.fillMultiRectAreaPaint(mra);
             return;
         }
 
@@ -355,8 +358,10 @@
 
     @Override
     public void fillRect(int x, int y, int width, int height) {
-        if (!nativeBrush) {
-            super.fillRect(x, y, width, height);
+        if (!nativeBrush || composite != AlphaComposite.SrcOver) {
+            Shape s = transform.createTransformedShape(new Rectangle(x, y, width, height));
+            MultiRectArea mra = jsr.rasterize(s, 0.5);
+            super.fillMultiRectAreaPaint(mra);
             return;
         }
 



Mime
View raw message