mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
// XAML Map Control - http://xamlmapcontrol.codeplex.com/
|
|
// Copyright © 2012 Clemens Fischer
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
namespace MapControl
|
|
{
|
|
public struct Int32Rect
|
|
{
|
|
public Int32Rect(int x, int y, int width, int height)
|
|
: this()
|
|
{
|
|
X = x;
|
|
Y = y;
|
|
Width = width;
|
|
Height = height;
|
|
}
|
|
|
|
public int X { get; set; }
|
|
public int Y { get; set; }
|
|
public int Width { get; set; }
|
|
public int Height { get; set; }
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return X ^ Y ^ Width ^ Height;
|
|
}
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
return obj is Int32Rect && (Int32Rect)obj == this;
|
|
}
|
|
|
|
public static bool operator ==(Int32Rect rect1, Int32Rect rect2)
|
|
{
|
|
return rect1.X == rect2.X && rect1.Y == rect2.Y && rect1.Width == rect2.Width && rect1.Height == rect2.Height;
|
|
}
|
|
|
|
public static bool operator !=(Int32Rect rect1, Int32Rect rect2)
|
|
{
|
|
return !(rect1 == rect2);
|
|
}
|
|
}
|
|
}
|