mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
New Rect capabilities
This commit is contained in:
parent
88adb3a1cd
commit
b756fe50eb
1 changed files with 32 additions and 0 deletions
|
@ -18,6 +18,12 @@ namespace Beefy.geom
|
||||||
{
|
{
|
||||||
return mX;
|
return mX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set mut
|
||||||
|
{
|
||||||
|
mWidth = mX + mWidth - value;
|
||||||
|
mX = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public float Top
|
public float Top
|
||||||
|
@ -26,6 +32,12 @@ namespace Beefy.geom
|
||||||
{
|
{
|
||||||
return mY;
|
return mY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set mut
|
||||||
|
{
|
||||||
|
mHeight = mY + mHeight - value;
|
||||||
|
mY = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public float Right
|
public float Right
|
||||||
|
@ -34,6 +46,11 @@ namespace Beefy.geom
|
||||||
{
|
{
|
||||||
return mX + mWidth;
|
return mX + mWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set mut
|
||||||
|
{
|
||||||
|
mWidth = value - mX;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public float Bottom
|
public float Bottom
|
||||||
|
@ -42,6 +59,11 @@ namespace Beefy.geom
|
||||||
{
|
{
|
||||||
return mY + mHeight;
|
return mY + mHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set mut
|
||||||
|
{
|
||||||
|
mHeight = value - mY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public float Width
|
public float Width
|
||||||
|
@ -50,6 +72,11 @@ namespace Beefy.geom
|
||||||
{
|
{
|
||||||
return mWidth;
|
return mWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set mut
|
||||||
|
{
|
||||||
|
mWidth = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public float Height
|
public float Height
|
||||||
|
@ -58,6 +85,11 @@ namespace Beefy.geom
|
||||||
{
|
{
|
||||||
return mHeight;
|
return mHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set mut
|
||||||
|
{
|
||||||
|
mHeight = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public this(float x = 0, float y = 0, float width = 0, float height = 0)
|
public this(float x = 0, float y = 0, float width = 0, float height = 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue