Author: pbartok
Date: 2006-04-25 19:06:40 -0400 (Tue, 25 Apr 2006)
New Revision: 59885

Modified:
   trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog
   trunk/mcs/class/System.Drawing/System.Drawing/Icon.cs
Log:
2006-04-25  Peter Dennis Bartok  <[EMAIL PROTECTED]>

        * Icon.cs: We need to or, not and our alpha values into the
          palette. Also, we need to actually store the altered palette
          on the bitmap, since we are altering a copy.



Modified: trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog     2006-04-25 
22:59:57 UTC (rev 59884)
+++ trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog     2006-04-25 
23:06:40 UTC (rev 59885)
@@ -1,3 +1,9 @@
+2006-04-25  Peter Dennis Bartok  <[EMAIL PROTECTED]>
+
+       * Icon.cs: We need to or, not and our alpha values into the
+         palette. Also, we need to actually store the altered palette
+         on the bitmap, since we are altering a copy.
+
 2006-04-10  Sebastien Pouliot  <[EMAIL PROTECTED]> 
 
        * gdipFunctions.cs: Fixed wrappers for GdipCreateMatrix3[I].

Modified: trunk/mcs/class/System.Drawing/System.Drawing/Icon.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/Icon.cs       2006-04-25 
22:59:57 UTC (rev 59884)
+++ trunk/mcs/class/System.Drawing/System.Drawing/Icon.cs       2006-04-25 
23:06:40 UTC (rev 59885)
@@ -373,8 +373,9 @@
                                pal = bmp.Palette;                              
// Managed palette
 
                                for (int i = 0; i < ii.iconColors.Length; i++) {
-                                       pal.Entries[i] = 
Color.FromArgb((int)ii.iconColors[i] & unchecked((int)0xff000000));
+                                       pal.Entries[i] = 
Color.FromArgb((int)ii.iconColors[i] | unchecked((int)0xff000000));
                                }
+                               bmp.Palette = pal;
                        }
 
                        bytesPerLine = (int)((((bih.biWidth * bih.biBitCount) + 
31) & ~31) >> 3);
@@ -448,7 +449,7 @@
                                throw new System.ArgumentException ("The 
argument 'stream' must be a picture that can be used as a Icon", "stream");
                        
                        BinaryReader reader = new BinaryReader (stream);
-            
+
                        //iconDir = new IconDir ();
                        iconDir.idReserved = reader.ReadUInt16();
                        if (iconDir.idReserved != 0) //must be 0

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to