harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r966188 - /harmony/enhanced/java/trunk/classlib/modules/awt/src/main/java/common/java/awt/Color.java
Date Wed, 21 Jul 2010 11:43:40 GMT
Author: tellison
Date: Wed Jul 21 11:43:40 2010
New Revision: 966188

URL: http://svn.apache.org/viewvc?rev=966188&view=rev
Log:
Apply patch for HARMONY-6592 ([classlib][awt] Color.getBlue failed on FOP's test case)

Modified:
    harmony/enhanced/java/trunk/classlib/modules/awt/src/main/java/common/java/awt/Color.java

Modified: harmony/enhanced/java/trunk/classlib/modules/awt/src/main/java/common/java/awt/Color.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/awt/src/main/java/common/java/awt/Color.java?rev=966188&r1=966187&r2=966188&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/awt/src/main/java/common/java/awt/Color.java
(original)
+++ harmony/enhanced/java/trunk/classlib/modules/awt/src/main/java/common/java/awt/Color.java
Wed Jul 21 11:43:40 2010
@@ -163,10 +163,10 @@ public class Color implements Paint, Ser
 
         frgbvalue = cs.toRGB(fvalue);
 
-        value =  ((int)(frgbvalue[2]*255 + 0.5))    |
-                (((int)(frgbvalue[1]*255 + 0.5)) << 8 )  |
-                (((int)(frgbvalue[0]*255 + 0.5)) << 16 ) |
-                (((int)(falpha*255 + 0.5)) << 24 );
+        value =  ((int)(frgbvalue[2]*255))    |
+                (((int)(frgbvalue[1]*255)) << 8 )  |
+                (((int)(frgbvalue[0]*255)) << 16 ) |
+                (((int)(falpha*255)) << 24 );
     }
 
     public Color(int rgba, boolean hasAlpha) {



Mime
View raw message