recrownedgtk/RecrownedGTK/Types/Rectangle.cs

27 lines
588 B
C#

namespace RecrownedGTK.Types
{
public class Rectangle
{
public virtual float Width {set; get;}
public virtual float Height {set; get;}
public virtual float X {set; get;}
public virtual float Y {set; get;}
public float Area {
get {
return Width * Height;
}
}
public Rectangle() {
}
public Rectangle(float x, float y, float width, float height) {
Width = width;
Height = height;
X = x;
Y = y;
}
}
}