Author: jordi
Date: 2005-03-02 09:58:49 -0500 (Wed, 02 Mar 2005)
New Revision: 41360

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs
Log:
2005-03-02  Jordi Mas i Hernandez <[EMAIL PROTECTED]>
        * ImageList.cs
          - Changes 32-bit pixel format to Format32bppArgb to allow transparency
          - Fixes ImageList constructor with ImageList container
          - Fixes image scaling (wrong parameters at DrawImage)



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-03-02 14:39:48 UTC (rev 41359)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-03-02 14:58:49 UTC (rev 41360)
@@ -1,3 +1,9 @@
+2005-03-02  Jordi Mas i Hernandez <[EMAIL PROTECTED]>
+       * ImageList.cs
+         - Changes 32-bit pixel format to Format32bppArgb to allow transparency
+         - Fixes ImageList constructor with ImageList container
+         - Fixes image scaling (wrong parameters at DrawImage)
+
 2005-02-02  Jackson Harper  <[EMAIL PROTECTED]>
 
        * Binding.cs: Make property searches case-insensitive. Eliminate

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs     
2005-03-02 14:39:48 UTC (rev 41359)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageList.cs     
2005-03-02 14:58:49 UTC (rev 41360)
@@ -120,8 +120,8 @@
                                        case ColorDepth.Depth8Bit:      
format=PixelFormat.Format8bppIndexed; break;
                                        case ColorDepth.Depth16Bit:     
format=PixelFormat.Format16bppRgb555; break;
                                        case ColorDepth.Depth24Bit:     
format=PixelFormat.Format24bppRgb; break;
-                                       case ColorDepth.Depth32Bit:     
format=PixelFormat.Format32bppRgb; break;
-                                       default:                        
format=PixelFormat.Format32bppRgb; break;
+                                       case ColorDepth.Depth32Bit:     
format=PixelFormat.Format32bppArgb; break;
+                                       default:                        
format=PixelFormat.Format32bppArgb; break;
                                }
 
                                // Check if we can add straight or if we have 
to resize
@@ -132,7 +132,7 @@
                                        reformatted_image = new Bitmap(width, 
height, format);
                                        g=Graphics.FromImage(reformatted_image);
 
-                                       g.DrawImage(image, new Rectangle(0, 0, 
width, height), 0, 0, width, height, GraphicsUnit.Pixel);
+                                       g.DrawImage(image, new Rectangle(0, 0, 
width, height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel);
                                        g.Dispose();
 
                                        return list.Add(reformatted_image);
@@ -352,6 +352,9 @@
 
                public ImageList(System.ComponentModel.IContainer container) : 
this ()
                {
+                       color_depth = ColorDepth.Depth8Bit;
+                       transparency_color = Color.Transparent;
+                       size = new Size(16, 16);
                        container.Add (this);
                }
                #endregion      // Public Constructors

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

Reply via email to