harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r585991 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
Date Thu, 18 Oct 2007 14:51:18 GMT
Author: apetrenko
Date: Thu Oct 18 07:51:17 2007
New Revision: 585991

URL: http://svn.apache.org/viewvc?rev=585991&view=rev
Log:
Patch for HARMONY-4825 "[classlib][awt] Can not use XORMode to erase 
what was drawn previously"

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=585991&r1=585990&r2=585991&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
Thu Oct 18 07:51:17 2007
@@ -40,6 +40,7 @@
 
 import org.apache.harmony.awt.gl.CommonGraphics2D;
 import org.apache.harmony.awt.gl.MultiRectArea;
+import org.apache.harmony.awt.gl.XORComposite;
 import org.apache.harmony.awt.gl.font.FontManager;
 import org.apache.harmony.awt.gl.font.NativeFont;
 import org.apache.harmony.awt.gl.font.fontlib.FLTextRenderer;
@@ -200,7 +201,7 @@
 
     @Override
     protected void fillMultiRectAreaPaint(MultiRectArea mra) {
-        if (nativeBrush) {
+        if (nativeBrush && composite == AlphaComposite.SrcOver) {
             fillRects(gi, mra.rect, mra.rect[0]-1);
         } else {
             super.fillMultiRectAreaPaint(mra);
@@ -307,7 +308,7 @@
 
     @Override
     public void draw(Shape s) {
-        if (!nativePen) {
+        if (!nativePen || composite != AlphaComposite.SrcOver) {
             super.draw(s);
             return;
         }
@@ -319,7 +320,7 @@
 
     @Override
     public void drawLine(int x1, int y1, int x2, int y2) {
-        if (!nativePen) {
+        if (!nativePen || composite != AlphaComposite.SrcOver) {
             super.drawLine(x1, y1, x2, y2);
             return;
         }
@@ -329,7 +330,7 @@
 
     @Override
     public void drawRect(int x, int y, int width, int height) {
-        if (!nativePen) {
+        if (!nativePen || composite != AlphaComposite.SrcOver) {
             super.drawRect(x, y, width, height);
             return;
         }



Mime
View raw message