using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WMFConverter.Gdi
{
///
/// Represents a point (x,y).
///
public class Point
{
#region Properties
///
/// Point X
///
public int X { get; set; }
///
/// Point Y
///
public int Y { get; set; }
#endregion
#region Constructors
///
/// Default constructor.
///
///
///
public Point(int x, int y)
{
X = x;
Y = y;
}
#endregion
#region Public Methods
///
/// Serves as the default hash function.
///
///
public override int GetHashCode()
{
int prime = 31;
int result = 1;
result = prime * result + X;
result = prime * result + Y;
return result;
}
///
/// Determines whether the specified object is equal to the current object.
///
///
///
public override bool Equals(Object obj)
{
if (this == obj)
return true;
if (obj == null)
return false;
if (typeof(Point) != obj.GetType())
return false;
Point other = (Point)obj;
if (X != other.X)
return false;
if (Y != other.Y)
return false;
return true;
}
///
/// Returns a string that represents the current object.
///
///
public override string ToString()
{
return "Point [x=" + X + ", y=" + Y + "]";
}
#endregion
}
}