recrownedgtk/RecrownedGTK/Types/Rectangle.cs

27 lines
588 B
C#
Raw Normal View History

2020-02-17 02:44:21 +00:00
namespace RecrownedGTK.Types
{
2020-02-20 21:04:00 +00:00
public class Rectangle
2020-02-17 02:44:21 +00:00
{
2020-02-20 21:04:00 +00:00
public virtual float Width {set; get;}
public virtual float Height {set; get;}
2020-02-17 02:44:21 +00:00
2020-02-20 21:04:00 +00:00
public virtual float X {set; get;}
public virtual float Y {set; get;}
2020-02-17 02:44:21 +00:00
2020-02-20 21:04:00 +00:00
public float Area {
2020-02-17 02:44:21 +00:00
get {
return Width * Height;
}
}
2020-02-20 21:04:00 +00:00
public Rectangle() {
}
public Rectangle(float x, float y, float width, float height) {
2020-02-17 02:44:21 +00:00
Width = width;
Height = height;
X = x;
Y = y;
}
}
}