Allow mono-wrapper executable to be overridden by environment
[mono.git] / mcs / class / System.Drawing / System.Drawing / Point.cs
index 2a3e80ee0e23bb94d275aaa49fd65124c2ca6bb9..4737c4f1d455d97c26b28ffa11dc82468b0de1c4 100644 (file)
@@ -146,9 +146,9 @@ namespace System.Drawing
                ///     of the two points.
                /// </remarks>
 
-               public static bool operator == (Point pt_a, Point pt_b)
+               public static bool operator == (Point left, Point right)
                {
-                       return ((pt_a.X == pt_b.X) && (pt_a.Y == pt_b.Y));
+                       return ((left.X == right.X) && (left.Y == right.Y));
                }
                
                /// <summary>
@@ -161,9 +161,9 @@ namespace System.Drawing
                ///     of the two points.
                /// </remarks>
 
-               public static bool operator != (Point pt_a, Point pt_b)
+               public static bool operator != (Point left, Point right)
                {
-                       return ((pt_a.X != pt_b.X) || (pt_a.Y != pt_b.Y));
+                       return ((left.X != right.X) || (left.Y != right.Y));
                }
                
                /// <summary>
@@ -189,9 +189,9 @@ namespace System.Drawing
                ///     Point. Requires explicit cast.
                /// </remarks>
 
-               public static explicit operator Size (Point pt)
+               public static explicit operator Size (Point p)
                {
-                       return new Size (pt.X, pt.Y);
+                       return new Size (p.X, p.Y);
                }
 
                /// <summary>
@@ -203,9 +203,9 @@ namespace System.Drawing
                ///     Point. No explicit cast is required.
                /// </remarks>
 
-               public static implicit operator PointF (Point pt)
+               public static implicit operator PointF (Point p)
                {
-                       return new PointF (pt.X, pt.Y);
+                       return new PointF (p.X, p.Y);
                }
 
 
@@ -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>
@@ -318,12 +318,12 @@ namespace System.Drawing
                ///     Checks equivalence of this Point and another object.
                /// </remarks>
                
-               public override bool Equals (object o)
+               public override bool Equals (object obj)
                {
-                       if (!(o is Point))
+                       if (!(obj is Point))
                                return false;
 
-                       return (this == (Point) o);
+                       return (this == (Point) obj);
                }
 
                /// <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
 
        }
 }