Author: spouliot
Date: 2006-08-05 19:05:04 -0400 (Sat, 05 Aug 2006)
New Revision: 63397

Modified:
   trunk/libgdiplus/src/ChangeLog
   trunk/libgdiplus/src/font.c
   trunk/libgdiplus/src/graphics.c
Log:
2006-08-05  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * graphics.c: Changed null check not to print warnings during unit 
        tests.
        * font.c: logFont->lfCharSet is always 0 from GDI+ (but it's
        returned as 1 inside System.Drawing). Fix Mono/Windows test failure.



Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog      2006-08-05 21:07:11 UTC (rev 63396)
+++ trunk/libgdiplus/src/ChangeLog      2006-08-05 23:05:04 UTC (rev 63397)
@@ -1,3 +1,10 @@
+2006-08-05  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * graphics.c: Changed null check not to print warnings during unit 
+       tests.
+       * font.c: logFont->lfCharSet is always 0 from GDI+ (but it's
+       returned as 1 inside System.Drawing). Fix Mono/Windows test failure.
+
 2006-08-04 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
        * bitmap.c: allocate 32-bits space for 24bpp when locking as ReadOnly

Modified: trunk/libgdiplus/src/font.c
===================================================================
--- trunk/libgdiplus/src/font.c 2006-08-05 21:07:11 UTC (rev 63396)
+++ trunk/libgdiplus/src/font.c 2006-08-05 23:05:04 UTC (rev 63397)
@@ -821,11 +821,10 @@
 
        logFont = (LOGFONTA *)lf;
 
-       if (!font) {
+       if (!font || !graphics) {
                /* lf is an Out parameter and must be initialized if 
                   not NULL (even on error) */
                memset (logFont, 0, ucs2 ? sizeof (LOGFONTW) : sizeof 
(LOGFONTA));
-               logFont->lfCharSet = 1; // DEFAULT_CHARSET
                return InvalidParameter;
        }
 
@@ -857,7 +856,7 @@
                logFont->lfStrikeOut = 0;
        }
 
-       logFont->lfCharSet = 1; // DEFAULT_CHARSET
+       logFont->lfCharSet = 0; /* changed to 1 inside System.Drawing */
        logFont->lfOutPrecision = 0;
        logFont->lfClipPrecision = 0;
        if (graphics != NULL) {

Modified: trunk/libgdiplus/src/graphics.c
===================================================================
--- trunk/libgdiplus/src/graphics.c     2006-08-05 21:07:11 UTC (rev 63396)
+++ trunk/libgdiplus/src/graphics.c     2006-08-05 23:05:04 UTC (rev 63397)
@@ -558,7 +558,8 @@
 GpStatus 
 GdipDeleteGraphics (GpGraphics *graphics)
 {
-       g_return_val_if_fail (graphics != NULL, InvalidParameter);
+       if (!graphics)
+               return InvalidParameter;
 
        /* We don't destroy image because we did not create one. */
        if (graphics->copy_of_ctm) {

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

Reply via email to