2004-11-07 Geoff Norton <gnorton@customerdna.com>
authorGeoff Norton <grompf@sublimeintervention.com>
Wed, 8 Dec 2004 04:25:12 +0000 (04:25 -0000)
committerGeoff Norton <grompf@sublimeintervention.com>
Wed, 8 Dec 2004 04:25:12 +0000 (04:25 -0000)
        * System.Drawing/Graphics.cs:  Add FromHwndWithSize for the MWF/Quartz backend
        * System.Drawing/gdipFunctions.cs: Add the quartz dllimport into libgdiplus

svn path=/trunk/mcs/; revision=37365

mcs/class/System.Drawing/ChangeLog
mcs/class/System.Drawing/System.Drawing/Graphics.cs
mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs

index e0c73582cc2708ee5978c7175fc09189d05177b2..6757601dac13b420f904991c1ddcef8a234e8081 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-07  Geoff Norton  <gnorton@customerdna.com>
+
+       * System.Drawing/Graphics.cs:  Add FromHwndWithSize for the MWF/Quartz backend
+       * System.Drawing/gdipFunctions.cs: Add the quartz dllimport into libgdiplus
+
 2004-11-22  Ravindra  <rkumar@novell.com>
 
        * SD.csproj: Removed a wrong entry from files list.
index 279bfad6f693f2ff2558dbdbf1e4bc2d4cc84498..f008a0b021ffdda583f21a77b32b20118ba622bb 100755 (executable)
@@ -1253,6 +1253,13 @@ namespace System.Drawing
                        return null;
                }
 
+               public static Graphics FromHwndWithSize (IntPtr hwnd, int width, int height) {
+                       IntPtr graphics;
+                       Status s = GDIPlus.GdipCreateFromQuartz_macosx (hwnd, width, height, out graphics);
+                       GDIPlus.CheckStatus (s);
+                       return new Graphics (graphics);
+               }
+
                [EditorBrowsable (EditorBrowsableState.Advanced)]               
                public static Graphics FromHwnd (IntPtr hwnd)
                {
@@ -1264,6 +1271,7 @@ namespace System.Drawing
                                }
 
                                return FromXDrawable (hwnd, display);
+
                        }
 
                        Status status = GDIPlus.GdipCreateFromHWND (hwnd, out graphics);
index 499399178f3e40a93026bd542b03a00a787b7f61..76bfe76cdae2dbc734851183a18adbbc81d457f0 100644 (file)
@@ -1601,6 +1601,10 @@ namespace System.Drawing
 
                }
                
+               /* Mac only function calls */
+               [DllImport("gdiplus.dll")]
+               internal static extern Status GdipCreateFromQuartz_macosx (IntPtr cgref, int width, int height, out IntPtr graphics);
+
                /* Linux only function calls*/
                [DllImport("gdiplus.dll")]
                internal static extern Status GdipSetVisibleClip_linux (IntPtr graphics, ref Rectangle rect);