// 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
{
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
/// 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>
/// 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>
{
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
/// 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>
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);
{
return new PointF (pt.X - sz.Width, pt.Y - sz.Height);
}
-#endif
}
}