Author: spouliot
Date: 2007-04-03 15:56:55 -0400 (Tue, 03 Apr 2007)
New Revision: 75360

Modified:
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/Xlib.cs
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/XplatUIX11-new.cs
Log:
2007-04-03  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * Xlib.cs: Remove import of libgdiplus' GetFontMetrics (it doesn't 
        exists anymore).
        * XplatUIX11-new.cs: Re-implement GetFontMetrics with existing APIs.



Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/ChangeLog
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/ChangeLog
    2007-04-03 19:54:03 UTC (rev 75359)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/ChangeLog
    2007-04-03 19:56:55 UTC (rev 75360)
@@ -1,3 +1,9 @@
+2007-04-03  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * Xlib.cs: Remove import of libgdiplus' GetFontMetrics (it doesn't 
+       exists anymore).
+       * XplatUIX11-new.cs: Re-implement GetFontMetrics with existing APIs.
+
 2007-04-03  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
 
        * XplatUIX11-new.cs: Port changes from XplatUIX11.cs

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/Xlib.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/Xlib.cs  
    2007-04-03 19:54:03 UTC (rev 75359)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/Xlib.cs  
    2007-04-03 19:56:55 UTC (rev 75360)
@@ -29,7 +29,6 @@
 
        internal class Xlib {
                const string libX11 = "X11";
-               const string gdiplus = "gdiplus";
 
                [DllImport (libX11)]
                public extern static IntPtr XOpenDisplay(IntPtr display);
@@ -215,9 +214,6 @@
                [DllImport (libX11)]
                public extern static int XDeleteProperty(IntPtr display, IntPtr 
window, IntPtr property);
 
-               [DllImport (gdiplus)]
-               public extern static bool GetFontMetrics(IntPtr graphicsObject, 
IntPtr nativeObject, out int ascent, out int descent);
-
                // Drawing
                [DllImport (libX11)]
                public extern static IntPtr XCreateGC(IntPtr display, IntPtr 
window, IntPtr valuemask, ref XGCValues values);

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/XplatUIX11-new.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/XplatUIX11-new.cs
    2007-04-03 19:54:03 UTC (rev 75359)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/XplatUIX11-new.cs
    2007-04-03 19:56:55 UTC (rev 75360)
@@ -524,7 +524,10 @@
                // XXX this should be shared amongst non-win32 backends
                internal override bool GetFontMetrics (Graphics g, Font font, 
out int ascent, out int descent)
                {
-                       return Xlib.GetFontMetrics(g.GetHdc(), font.ToHfont(), 
out ascent, out descent);
+                       FontFamily ff = font.FontFamily;
+                       ascent = ff.GetCellAscent (font.Style);
+                       descent = ff.GetCellDescent (font.Style);
+                       return true;
                }
 
 

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

Reply via email to