Author: jordi
Date: 2005-03-21 06:21:50 -0500 (Mon, 21 Mar 2005)
New Revision: 42045

Modified:
   trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog
   trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs
   trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs
Log:
2004-03-21 Jordi Mas i Hernadez <[EMAIL PROTECTED]>

        * ColorMatrix.cs: fixes Matrix00 init 
        * ImageAttributes.cs: fixes dispose method and signature



Modified: trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog     
2005-03-21 11:19:41 UTC (rev 42044)
+++ trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog     
2005-03-21 11:21:50 UTC (rev 42045)
@@ -1,3 +1,8 @@
+2004-03-21 Jordi Mas i Hernadez <[EMAIL PROTECTED]>
+
+       * ColorMatrix.cs: fixes Matrix00 init 
+       * ImageAttributes.cs: fixes dispose method and signature
+
 2004-02-25 Jordi Mas i Hernadez <[EMAIL PROTECTED]>
 
        * ColorMatrix.cs: rewritten to be able to marshall it properly

Modified: trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs        
2005-03-21 11:19:41 UTC (rev 42044)
+++ trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs        
2005-03-21 11:21:50 UTC (rev 42045)
@@ -79,7 +79,7 @@
                [CLSCompliant(false)]
                public ColorMatrix (float[][] matrix)
                {                       
-                       color00 = matrix [0][1];
+                       color00 = matrix [0][0];
                        color01 = matrix [0][1];
                        color02 = matrix [0][2];
                        color03 = matrix [0][3];

Modified: 
trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs    
2005-03-21 11:19:41 UTC (rev 42044)
+++ trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs    
2005-03-21 11:21:50 UTC (rev 42045)
@@ -214,34 +214,23 @@
                                throw new Exception ("Error calling 
GDIPlus.SetColorMatrix:" +status);                                              
                                         
                }
                
-               void Dispose (bool disposing)
-               {
-                       if (!disposing) return;
-                       
-                       Status status = 
GDIPlus.GdipDisposeImageAttributes(nativeImageAttr);
-                       
-                       if (status != Status.Ok)
-                               throw new Exception ("Error calling 
GDIPlus.GdipDisposeImageAttributes:" +status);
-                       else
-                               nativeImageAttr = IntPtr.Zero;
-               }
-
-
                public void Dispose() 
                {
+                       if (nativeImageAttr != IntPtr.Zero) {
+                               
+                               Status status = 
GDIPlus.GdipDisposeImageAttributes(nativeImageAttr);
+                               GDIPlus.CheckStatus (status);                   
        
+                               nativeImageAttr = IntPtr.Zero;
+                       }                       
                        
-                       Dispose (true);
                        System.GC.SuppressFinalize (this);
                }
 
                ~ImageAttributes() 
-               {
-                       
-                       Dispose (false);
-               }
-
+               {                       
+                       Dispose ();
+               }               
                
-               
                public object Clone()
                {       
                        IntPtr imgclone;        

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

Reply via email to