2006-02-09 Peter Dennis Bartok <pbartok@novell.com>
authorPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>
Thu, 9 Feb 2006 23:56:45 +0000 (23:56 -0000)
committerPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>
Thu, 9 Feb 2006 23:56:45 +0000 (23:56 -0000)
* ChangeLog: Created, contents from deleted 'changelog' file
* FontCollection.cs: Cleaned up marshalling and made 64bit safe

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

mcs/class/System.Drawing/System.Drawing.Text/ChangeLog [new file with mode: 0644]
mcs/class/System.Drawing/System.Drawing.Text/FontCollection.cs
mcs/class/System.Drawing/System.Drawing.Text/changelog [deleted file]

diff --git a/mcs/class/System.Drawing/System.Drawing.Text/ChangeLog b/mcs/class/System.Drawing/System.Drawing.Text/ChangeLog
new file mode 100644 (file)
index 0000000..7066c72
--- /dev/null
@@ -0,0 +1,96 @@
+2006-02-09  Peter Dennis Bartok  <pbartok@novell.com>
+
+       * ChangeLog: Created, contents from deleted 'changelog' file
+       * FontCollection.cs: Cleaned up marshalling and made 64bit safe
+
+2005-12-13 Konstantin Triger <kostat@mainsoft.com>
+
+       * TextLineIterator.jvm.cs: handle null string.
+
+2005-11-16 Konstantin Triger <kostat@mainsoft.com>
+
+        * PrivateFontCollection.jvm.cs: open a correct stream.
+
+2005-11-13 Konstantin Triger <kostat@mainsoft.com>
+
+       * Added LineLayout.jvm.cs, TextLineIterator.jvm.cs for text support
+
+2005-11-10 Vladimir Krasnov <vladimirk@mainsoft.com>
+
+       * FontCollection.jvm.cs: refactoring, added GetInitialFont()
+       * InstalledFontCollection.jvm.cs: refactoring, removed GetFamilyName
+       * PrivateFontCollection.jvm.cs: refactoring
+
+2005-08-03  Andrew Skiba <andrews@mainsoft.com>
+
+       * FontCollection.jvm.cs, InstalledFontCollection.jvm.cs,
+       PrivateFontCollection.jvm.cs: added TARGET_JVM implementation
+
+2005-04-04  Jordi Mas i Hernandez <jordi@ximian.com>
+
+       * PrivateFontCollection.cs: nativeFontCollection equals IntPtr.Zero to
+       avoid errors on multiple disposes
+       
+       * FontCollection.cs: implements dispose
+
+2004-11-25  Marek Safar  <marek.safar@seznam.cz>
+
+       * Image.cs: Add CheckStatus to Families.
+
+2004-02-25  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
+
+       * PrivateFontCollection.cs: Removed excess attributes
+
+2004-02-25  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
+
+       * FontCollection.cs: Remove console
+
+2004-02-06  Sanjay Gupta <gsanjay@novell.com>
+       * CheckStatus(): Used method of GDIPlus for error checking
+         in FontCollection.cs, InstalledFontCollection.cs and
+         PrivateFontCollection.cs
+
+2004-01-29  Sanjay Gupta <gsanjay@novell.com>
+       * FontCollection.cs: Implemented Dispose method.
+       * InstalledFontCollection.cs: Removed Console.WriteLine calls.
+       * PrivateFontCollection.cs: Implemented AddMemoryFont method.
+
+2004-01-28  Jordi Mas <jordi@ximian.com>
+       * FontCollection.cs: fixed marshalling issues
+
+2004-01-28  Sanjay Gupta <gsanjay@novell.com>
+
+       * FontCollection.cs: Implemented missing functionalities.
+       * InstalledFontCollection.css: Implemented missing functionalities.
+       * PrivateFontCollection.cs: Implemented few methods.
+
+2004-01-10 Ravindra <rkumar@novell.com>
+
+       * All Enums: Made serializable.
+
+2003-10-12 Alexandre Pigolkine <pigolkine@gmx.de>
+       * InstalledFontCollection.cs    factory removed
+
+2003-06-22 Alexandre Pigolkine <pigolkine@gmx.de>
+       * FontCollection.cs
+       * InstalledFontCollection.cs
+               calls to implementation added
+       
+2002-09-16  Nick Drochak  <ndrochak@gol.com>
+
+       * PrivateFontCollection.cs: Fix build error.  Cannot put ComVisible on
+       constructors.
+
+2003-09-14     Piers Haken <piersh@friskit.com>
+
+       * PrivateFontCollection.cs: import interop for ComVisible attribute
+
+2002-09-13  Dennis Hayes (dennish@raytek.com)
+* checked in for Everaldo Canuto everaldo.canuto@bol.com.br
+
+* FontCollection.cs
+* GenericFontFamilies.cs
+* HotkeyPrefix.cs
+* InstalledFontCollection.cs
+* PrivateFontCollection.cs
+* TextRenderingHint.cs
index 81d6ed771e331f8883619cd2fd4061518d19dea1..4c8782926e431d59e32a11d14b5a99e58d3c0dd7 100644 (file)
@@ -70,22 +70,15 @@ namespace System.Drawing.Text {
                                status = GDIPlus.GdipGetFontCollectionFamilyCount (nativeFontCollection, out found);
                                GDIPlus.CheckStatus (status);
                                
-                               int nSize =  Marshal.SizeOf (IntPtr.Zero);
-                               IntPtr dest = Marshal.AllocHGlobal (nSize * found);           
+                               IntPtr dest = Marshal.AllocHGlobal (IntPtr.Size * found);           
                
                                status = GDIPlus.GdipGetFontCollectionFamilyList(nativeFontCollection, found, dest, out returned);
                                   
-                               IntPtr[] ptrAr = new IntPtr [returned];
-                               int pos = dest.ToInt32 ();
-                               for ( int i = 0; i < returned ; i++, pos+=nSize)
-                                       ptrAr[i] = (IntPtr)Marshal.PtrToStructure ((IntPtr)pos, typeof(IntPtr));
+                               families = new FontFamily [returned];
+                               for ( int i = 0; i < returned ; i++)
+                                       families[i] = new FontFamily(Marshal.ReadIntPtr (dest, i * IntPtr.Size));
            
                                Marshal.FreeHGlobal (dest);           
-                   
-                               families = new FontFamily [returned];
-                               for ( int i = 0; i < returned; i++ )
-                                       families[i] = new FontFamily (ptrAr[i]);                     
-                           
                                return families;               
                        }
                }
diff --git a/mcs/class/System.Drawing/System.Drawing.Text/changelog b/mcs/class/System.Drawing/System.Drawing.Text/changelog
deleted file mode 100644 (file)
index 39cea55..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-2005-12-13 Konstantin Triger <kostat@mainsoft.com>
-
-       * TextLineIterator.jvm.cs: handle null string.
-
-2005-11-16 Konstantin Triger <kostat@mainsoft.com>
-
-        * PrivateFontCollection.jvm.cs: open a correct stream.
-
-2005-11-13 Konstantin Triger <kostat@mainsoft.com>
-
-       * Added LineLayout.jvm.cs, TextLineIterator.jvm.cs for text support
-
-2005-11-10 Vladimir Krasnov <vladimirk@mainsoft.com>
-
-       * FontCollection.jvm.cs: refactoring, added GetInitialFont()
-       * InstalledFontCollection.jvm.cs: refactoring, removed GetFamilyName
-       * PrivateFontCollection.jvm.cs: refactoring
-
-2005-08-03  Andrew Skiba <andrews@mainsoft.com>
-
-       * FontCollection.jvm.cs, InstalledFontCollection.jvm.cs,
-       PrivateFontCollection.jvm.cs: added TARGET_JVM implementation
-
-2005-04-04  Jordi Mas i Hernandez <jordi@ximian.com>
-
-       * PrivateFontCollection.cs: nativeFontCollection equals IntPtr.Zero to
-       avoid errors on multiple disposes
-       
-       * FontCollection.cs: implements dispose
-
-2004-11-25  Marek Safar  <marek.safar@seznam.cz>
-
-       * Image.cs: Add CheckStatus to Families.
-
-2004-02-25  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
-
-       * PrivateFontCollection.cs: Removed excess attributes
-
-2004-02-25  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
-
-       * FontCollection.cs: Remove console
-
-2004-02-06  Sanjay Gupta <gsanjay@novell.com>
-       * CheckStatus(): Used method of GDIPlus for error checking
-         in FontCollection.cs, InstalledFontCollection.cs and
-         PrivateFontCollection.cs
-
-2004-01-29  Sanjay Gupta <gsanjay@novell.com>
-       * FontCollection.cs: Implemented Dispose method.
-       * InstalledFontCollection.cs: Removed Console.WriteLine calls.
-       * PrivateFontCollection.cs: Implemented AddMemoryFont method.
-
-2004-01-28  Jordi Mas <jordi@ximian.com>
-       * FontCollection.cs: fixed marshalling issues
-
-2004-01-28  Sanjay Gupta <gsanjay@novell.com>
-
-       * FontCollection.cs: Implemented missing functionalities.
-       * InstalledFontCollection.css: Implemented missing functionalities.
-       * PrivateFontCollection.cs: Implemented few methods.
-
-2004-01-10 Ravindra <rkumar@novell.com>
-
-       * All Enums: Made serializable.
-
-2003-10-12 Alexandre Pigolkine <pigolkine@gmx.de>
-       * InstalledFontCollection.cs    factory removed
-
-2003-06-22 Alexandre Pigolkine <pigolkine@gmx.de>
-       * FontCollection.cs
-       * InstalledFontCollection.cs
-               calls to implementation added
-       
-2002-09-16  Nick Drochak  <ndrochak@gol.com>
-
-       * PrivateFontCollection.cs: Fix build error.  Cannot put ComVisible on
-       constructors.
-
-2003-09-14     Piers Haken <piersh@friskit.com>
-
-       * PrivateFontCollection.cs: import interop for ComVisible attribute
-
-2002-09-13  Dennis Hayes (dennish@raytek.com)
-* checked in for Everaldo Canuto everaldo.canuto@bol.com.br
-
-* FontCollection.cs
-* GenericFontFamilies.cs
-* HotkeyPrefix.cs
-* InstalledFontCollection.cs
-* PrivateFontCollection.cs
-* TextRenderingHint.cs