2007-05-03 Igor Zelmanovich <igorz@mainsoft.com>
authorIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Thu, 3 May 2007 16:47:09 +0000 (16:47 -0000)
committerIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Thu, 3 May 2007 16:47:09 +0000 (16:47 -0000)
* ColorConverter.cs: fixed GetStandardValues() for TARGET_JVM
* Font.jvm.cs: fixed GetHeight()

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

mcs/class/System.Drawing/System.Drawing/ChangeLog
mcs/class/System.Drawing/System.Drawing/ColorConverter.cs
mcs/class/System.Drawing/System.Drawing/Font.jvm.cs

index a11cd927ad1b9dd15d8b3b4fb53a89259248d62c..e386f94d59183507970227286dedeab492206eb3 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-03 Igor Zelmanovich <igorz@mainsoft.com>
+
+       * ColorConverter.cs: fixed GetStandardValues() for TARGET_JVM
+       * Font.jvm.cs: fixed GetHeight()        
+
 2007-05-02  Sebastien Pouliot  <sebastien@ximian.com>
 
        * gdipEnums.cs: Add GetSysColorIndex
index f295dada8335a4f0ff83cc3c11719b3996a88e77..edf56c317a2560e8164419e9e6f13b5a56a2de55 100644 (file)
@@ -225,7 +225,8 @@ namespace System.Drawing
                                if (cached != null)
                                        return cached;
 #if TARGET_JVM
-                               Color [] colors = (Color []) KnownColors.Values.Clone ();
+                               Color [] colors = new Color [KnownColors.Values.Length - 1];
+                               Array.Copy (KnownColors.Values, 1, colors, 0, colors.Length);
 #else
                                Array colors = Array.CreateInstance (typeof (Color), KnownColors.ArgbValues.Length - 1);
                                for (int i=1; i < KnownColors.ArgbValues.Length; i++) {
index 4f21ac8406b635d3f1beb5a43b908b77cdf1d792..ad062b4e48e5cc36eaec243b076d0bb10fb02260 100644 (file)
@@ -223,11 +223,8 @@ namespace System.Drawing {
 
                public float GetHeight (Graphics graphics) {
                        if (graphics == null)
-                               throw new ArgumentNullException ("graphics");
-
-                       awt.Font f = NativeObject.deriveFont (graphics.GetFinalTransform ());
-                       return (FontFamily.GetLineSpacing (Style) / FontFamily.GetEmHeight (Style))
-                               * (f.getSize2D () / _screenResolutionConverter [(int) Unit]);
+                               throw new ArgumentNullException ("graphics");\r
+                       return GetHeight (graphics.DpiY);
                }
 
                public bool Italic {