Allow mono-wrapper executable to be overridden by environment
[mono.git] / mcs / class / System.Drawing / System.Drawing / PointF.cs
index 7019947d9a1f79b0bb0a2547774f8796d6a00f30..1a64613aa24992e4a43ab2d974b57a8c6a68016a 100644 (file)
@@ -5,11 +5,7 @@
 //   Mike Kestner (mkestner@speakeasy.net)
 //
 // Copyright (C) 2001 Mike Kestner
-// Copyright (C) 2004 Novell, Inc. http://www.novell.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -72,6 +68,10 @@ namespace System.Drawing
                {
                        return new PointF (pt.X + sz.Width, pt.Y + sz.Height);
                }
+               public static PointF operator + (PointF pt, SizeF sz)
+               {
+                       return new PointF (pt.X + sz.Width, pt.Y + sz.Height);
+               }
                
                /// <summary>
                ///     Equality Operator
@@ -83,9 +83,9 @@ namespace System.Drawing
                ///     of the two points.
                /// </remarks>
 
-               public static bool operator == (PointF pt_a, PointF pt_b)
+               public static bool operator == (PointF left, PointF right)
                {
-                       return ((pt_a.X == pt_b.X) && (pt_a.Y == pt_b.Y));
+                       return ((left.X == right.X) && (left.Y == right.Y));
                }
                
                /// <summary>
@@ -98,9 +98,9 @@ namespace System.Drawing
                ///     of the two points.
                /// </remarks>
 
-               public static bool operator != (PointF pt_a, PointF pt_b)
+               public static bool operator != (PointF left, PointF right)
                {
-                       return ((pt_a.X != pt_b.X) || (pt_a.Y != pt_b.Y));
+                       return ((left.X != right.X) || (left.Y != right.Y));
                }
                
                /// <summary>
@@ -116,6 +116,10 @@ namespace System.Drawing
                {
                        return new PointF (pt.X - sz.Width, pt.Y - sz.Height);
                }
+               public static PointF operator - (PointF pt, SizeF sz)
+               {
+                       return new PointF (pt.X - sz.Width, pt.Y - sz.Height);
+               }
                
                // -----------------------
                // Public Constructor
@@ -196,12 +200,12 @@ namespace System.Drawing
                ///     Checks equivalence of this PointF and another object.
                /// </remarks>
                
-               public override bool Equals (object o)
+               public override bool Equals (object obj)
                {
-                       if (!(o is PointF))
+                       if (!(obj is PointF))
                                return false;
 
-                       return (this == (PointF) o);
+                       return (this == (PointF) obj);
                }
 
                /// <summary>
@@ -231,7 +235,6 @@ namespace System.Drawing
                                y.ToString (CultureInfo.CurrentCulture));
                }
 
-#if NET_2_0
                public static PointF Add (PointF pt, Size sz)
                {
                        return new PointF (pt.X + sz.Width, pt.Y + sz.Height);
@@ -251,7 +254,6 @@ namespace System.Drawing
                {
                        return new PointF (pt.X - sz.Width, pt.Y - sz.Height);
                }
-#endif
 
        }
 }