24 lines
499 B
C#
24 lines
499 B
C#
|
namespace RecrownedGTK.Types
|
||
|
{
|
||
|
public struct Rectangle
|
||
|
{
|
||
|
public int Width {set; get;}
|
||
|
public int Height {set; get;}
|
||
|
|
||
|
public int X {set; get;}
|
||
|
public int Y {set; get;}
|
||
|
|
||
|
public int Area {
|
||
|
get {
|
||
|
return Width * Height;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public Rectangle(int x, int y, int width, int height) {
|
||
|
Width = width;
|
||
|
Height = height;
|
||
|
X = x;
|
||
|
Y = y;
|
||
|
}
|
||
|
}
|
||
|
}
|