Allow mono-wrapper executable to be overridden by environment
[mono.git] / mcs / class / System.Drawing / System.Drawing / Point.cs
index ca6f4e63d75945ebe59aabe7c5d91344a67f8698..4737c4f1d455d97c26b28ffa11dc82468b0de1c4 100644 (file)
@@ -218,15 +218,15 @@ namespace System.Drawing
                /// </summary>
                ///
                /// <remarks>
-               ///     Creates a Point from an integer which holds the X
-               ///     coordinate in the high order 16 bits and the Y
+               ///     Creates a Point from an integer which holds the Y
+               ///     coordinate in the high order 16 bits and the X
                ///     coordinate in the low order 16 bits.
                /// </remarks>
                
                public Point (int dw)
                {
-                       x = dw >> 16;
-                       y = dw & 0xffff;
+                       y = dw >> 16;
+                       x = unchecked ((short) (dw & 0xffff));
                }
 
                /// <summary>
@@ -366,7 +366,6 @@ namespace System.Drawing
                        return string.Format ("{{X={0},Y={1}}}", x.ToString (CultureInfo.InvariantCulture), 
                                y.ToString (CultureInfo.InvariantCulture));
                }
-#if NET_2_0
                public static Point Add (Point pt, Size sz)
                {
                        return new Point (pt.X + sz.Width, pt.Y + sz.Height);
@@ -381,7 +380,6 @@ namespace System.Drawing
                {
                        return new Point (pt.X - sz.Width, pt.Y - sz.Height);
                }
-#endif
 
        }
 }