Made rectangle heritance friendly.
This commit is contained in:
parent
d91c325035
commit
848017edc2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user