Made rectangle heritance friendly.

This commit is contained in:
Harrison Deng 2020-02-20 16:04:00 -05:00
parent d91c325035
commit 848017edc2

View File

@ -1,20 +1,23 @@
namespace RecrownedGTK.Types
{
public struct Rectangle
public class Rectangle
{
public int Width {set; get;}
public int Height {set; get;}
public virtual float Width {set; get;}
public virtual float Height {set; get;}
public int X {set; get;}
public int Y {set; get;}
public virtual float X {set; get;}
public virtual float Y {set; get;}
public int Area {
public float Area {
get {
return Width * Height;
}
}
public Rectangle(int x, int y, int width, int height) {
public Rectangle() {
}
public Rectangle(float x, float y, float width, float height) {
Width = width;
Height = height;
X = x;