Author: spouliot
Date: 2005-05-09 11:52:11 -0400 (Mon, 09 May 2005)
New Revision: 44286

Modified:
   trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog
   trunk/mcs/class/System.Drawing/System.Drawing/Graphics.cs
   trunk/mcs/class/System.Drawing/System.Drawing/Image.cs
   trunk/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs
Log:
2005-05-09  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * gdipFunctions.cs: Use PlatformID.Unix under NET_2_0. 
        * Graphics.cs: Use PlatformID.Unix under NET_2_0. 
        * Image.cs: Use PlatformID.Unix under NET_2_0. 



Modified: trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog     2005-05-09 
15:27:16 UTC (rev 44285)
+++ trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog     2005-05-09 
15:52:11 UTC (rev 44286)
@@ -1,3 +1,9 @@
+2005-05-09  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * gdipFunctions.cs: Use PlatformID.Unix under NET_2_0. 
+       * Graphics.cs: Use PlatformID.Unix under NET_2_0. 
+       * Image.cs: Use PlatformID.Unix under NET_2_0. 
+
 2005-05-05  Miguel de Icaza  <[EMAIL PROTECTED]>
 
        * Bitmap.cs, Icon.cs (constructor): Use

Modified: trunk/mcs/class/System.Drawing/System.Drawing/Graphics.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/Graphics.cs   2005-05-09 
15:27:16 UTC (rev 44285)
+++ trunk/mcs/class/System.Drawing/System.Drawing/Graphics.cs   2005-05-09 
15:52:11 UTC (rev 44286)
@@ -1295,7 +1295,11 @@
                        GDIPlus.CheckStatus (status);
                        Graphics result = new Graphics (graphics);
                                
-                       if (Environment.OSVersion.Platform == (PlatformID) 128) 
 {
+#if NET_2_0
+                       if (Environment.OSVersion.Platform == PlatformID.Unix) {
+#else
+                       if (Environment.OSVersion.Platform == (PlatformID) 128) 
{
+#endif
                                Rectangle rect  = new Rectangle (0,0, 
image.Width, image.Height);
                                GDIPlus.GdipSetVisibleClip_linux 
(result.NativeObject, ref rect);
                        }

Modified: trunk/mcs/class/System.Drawing/System.Drawing/Image.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/Image.cs      2005-05-09 
15:27:16 UTC (rev 44285)
+++ trunk/mcs/class/System.Drawing/System.Drawing/Image.cs      2005-05-09 
15:52:11 UTC (rev 44286)
@@ -192,7 +192,11 @@
 
        internal void InitFromStream (Stream stream)
        {
+#if NET_2_0
+               if (Environment.OSVersion.Platform == PlatformID.Unix) {
+#else
                if (Environment.OSVersion.Platform == (PlatformID) 128) {
+#endif
                        // Unix, with libgdiplus
                        // We use a custom API for this, because there's no 
easy way
                        // to get the Stream down to libgdiplus.  So, we wrap 
the stream
@@ -386,7 +390,11 @@
                Status st;
                Guid guid = encoder.Clsid;
 
+#if NET_2_0
+               if (Environment.OSVersion.Platform == PlatformID.Unix) {
+#else
                if (Environment.OSVersion.Platform == (PlatformID) 128) {
+#endif
                        GDIPlus.GdiPlusStreamHelper sh = new 
GDIPlus.GdiPlusStreamHelper (stream);
                        if (encoderParams == null) {
                                st = GDIPlus.GdipSaveImageToDelegate_linux 
(nativeObject, sh.GetBytesDelegate, sh.PutBytesDelegate,

Modified: trunk/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs      
2005-05-09 15:27:16 UTC (rev 44285)
+++ trunk/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs      
2005-05-09 15:52:11 UTC (rev 44286)
@@ -47,7 +47,11 @@
                public const int FACESIZE = 32;
                public const int LANG_NEUTRAL = 0;
                public static IntPtr Display = IntPtr.Zero;
+#if NET_2_0
+               public static bool UseX11Drawable = 
(Environment.OSVersion.Platform == PlatformID.Unix);
+#else
                public static bool UseX11Drawable = 
(Environment.OSVersion.Platform == (PlatformID) 128);
+#endif
                public static bool UseQuartzDrawable = 
(Environment.GetEnvironmentVariable ("MONO_MWF_USE_QUARTZ_BACKEND") != null);
 
                #region gdiplus.dll functions

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

Reply via email to