From 848017edc29c34a5b6f66e972ac9f2fc547e62b0 Mon Sep 17 00:00:00 2001 From: Harrison Date: Thu, 20 Feb 2020 16:04:00 -0500 Subject: [PATCH] Made rectangle heritance friendly. --- RecrownedGTK/Types/Rectangle.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/RecrownedGTK/Types/Rectangle.cs b/RecrownedGTK/Types/Rectangle.cs index be12ee8..9a28024 100644 --- a/RecrownedGTK/Types/Rectangle.cs +++ b/RecrownedGTK/Types/Rectangle.cs @@ -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;