Author: spouliot
Date: 2007-04-26 07:51:37 -0400 (Thu, 26 Apr 2007)
New Revision: 76309
Modified:
trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog
trunk/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs
Log:
gdipFunctions.cs: Add p/invoke definitions for
GdipRecordMetafile[FileName|FromStream][I].
Modified: trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog 2007-04-26
11:44:44 UTC (rev 76308)
+++ trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog 2007-04-26
11:51:37 UTC (rev 76309)
@@ -1,3 +1,8 @@
+2007-04-26 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * gdipFunctions.cs: Add p/invoke definitions for GdipRecordMetafile
+ [FileName|FromStream][I].
+
2007-04-16 Sebastien Pouliot <[EMAIL PROTECTED]>
* Bitmap.cs: Add check in SetPixel for Format16bppGrayScale (but
Modified: trunk/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs
2007-04-26 11:44:44 UTC (rev 76308)
+++ trunk/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs
2007-04-26 11:51:37 UTC (rev 76309)
@@ -76,22 +76,22 @@
// shutting down
GC.Collect ();
GC.WaitForPendingFinalizers ();
-
+#if false
GdiPlusToken = 0;
- // This causes crashes in MS GDI+ because this call
occurs before
- // all managed GDI objects are finalized. When they are
finalized they call
- // into a shutdown GDI+ and we crash.
- //GdiplusShutdown (ref GdiPlusToken);
+ // This causes crashes in because this call occurs
before all
+ // managed GDI+ objects are finalized. When they are
finalized
+ // they call into a shutdown GDI+ and we crash.
+ GdiplusShutdown (ref GdiPlusToken);
// This causes crashes in Mono libgdiplus because this
call
// occurs before all managed GDI objects are finalized
// When they are finalized they use the closed display
and
// crash
- //if (UseX11Drawable && Display != IntPtr.Zero) {
- // XCloseDisplay (Display);
- //}
-
+ if (UseX11Drawable && Display != IntPtr.Zero) {
+ XCloseDisplay (Display);
+ }
+#endif
}
static GDIPlus ()
@@ -112,7 +112,8 @@
"\n" +
"Please check
http://www.mono-project.com/Problem:GDIPlusInit for details");
}
-
+
+ // under MS 1.x this event is raised only for the
default application domain
AppDomain.CurrentDomain.ProcessExit += new EventHandler
(ProcessExit);
}
@@ -1631,11 +1632,31 @@
internal static extern Status
GdipSetMetafileDownLevelRasterizationLimit (IntPtr metafile, uint
metafileRasterizationLimitDpi);
[DllImport ("gdiplus.dll")]
internal static extern Status GdipPlayMetafileRecord (IntPtr
metafile, EmfPlusRecordType recordType, int flags, int dataSize, byte[] data);
+
+ [DllImport ("gdiplus.dll")]
+ internal static extern Status GdipRecordMetafile (IntPtr hdc,
EmfType type, ref RectangleF frameRect,
+ MetafileFrameUnit frameUnit, [MarshalAs
(UnmanagedType.LPWStr)] string description, out IntPtr metafile);
+ [DllImport ("gdiplus.dll")]
+ internal static extern Status GdipRecordMetafileI (IntPtr hdc,
EmfType type, ref Rectangle frameRect,
+ MetafileFrameUnit frameUnit, [MarshalAs
(UnmanagedType.LPWStr)] string description, out IntPtr metafile);
+ [DllImport ("gdiplus.dll")]
+ internal static extern Status GdipRecordMetafileFileName
([MarshalAs (UnmanagedType.LPWStr)] string filename, IntPtr hdc, EmfType type,
+ ref RectangleF frameRect, MetafileFrameUnit frameUnit,
[MarshalAs (UnmanagedType.LPWStr)] string description, out IntPtr metafile);
+ [DllImport ("gdiplus.dll")]
+ internal static extern Status GdipRecordMetafileFileNameI
([MarshalAs (UnmanagedType.LPWStr)] string filename, IntPtr hdc, EmfType type,
+ ref Rectangle frameRect, MetafileFrameUnit frameUnit,
[MarshalAs (UnmanagedType.LPWStr)] string description, out IntPtr metafile);
#if !TEST
[DllImport("gdiplus.dll", ExactSpelling=true,
CharSet=CharSet.Unicode)]
internal static extern Status
GdipCreateMetafileFromStream([MarshalAs(UnmanagedType.CustomMarshaler,
MarshalTypeRef=typeof(ComIStreamMarshaler))] IStream stream, out IntPtr
metafile);
[DllImport("gdiplus.dll", ExactSpelling=true,
CharSet=CharSet.Unicode)]
internal static extern Status
GdipGetMetafileHeaderFromStream([MarshalAs(UnmanagedType.CustomMarshaler,
MarshalTypeRef=typeof(ComIStreamMarshaler))] IStream stream, IntPtr header);
+
+ [DllImport ("gdiplus.dll")]
+ internal static extern Status GdipRecordMetafileStream
([MarshalAs(UnmanagedType.CustomMarshaler,
MarshalTypeRef=typeof(ComIStreamMarshaler))] IStream stream, IntPtr hdc,
+ EmfType type, ref RectangleF frameRect,
MetafileFrameUnit frameUnit, [MarshalAs (UnmanagedType.LPWStr)] string
description, out IntPtr metafile);
+ [DllImport ("gdiplus.dll")]
+ internal static extern Status GdipRecordMetafileStreamI
([MarshalAs(UnmanagedType.CustomMarshaler,
MarshalTypeRef=typeof(ComIStreamMarshaler))] IStream stream, IntPtr hdc,
+ EmfType type, ref Rectangle frameRect,
MetafileFrameUnit frameUnit, [MarshalAs (UnmanagedType.LPWStr)] string
description, out IntPtr metafile);
#endif
//ImageCodecInfo functions
[DllImport("gdiplus.dll")]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches