1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Beefy2d updates

This commit is contained in:
Brian Fiete 2025-01-10 14:04:06 -08:00
parent 35779edc14
commit 96c0a44a7e
3 changed files with 15 additions and 0 deletions

View file

@ -484,6 +484,11 @@ namespace Beefy
BFWindow_Resize(mNativeWindow, (int32)x, (int32)y, (int32)width, (int32)height, (int32)showKind); BFWindow_Resize(mNativeWindow, (int32)x, (int32)y, (int32)width, (int32)height, (int32)showKind);
} }
public virtual void ResizeClient(int width, int height)
{
Resize(mX, mY, mWindowWidth + (width - mClientWidth), mWindowHeight + (height - mClientHeight));
}
public void SetForeground() public void SetForeground()
{ {
BFWindow_SetForeground(mNativeWindow); BFWindow_SetForeground(mNativeWindow);

View file

@ -244,6 +244,11 @@ namespace Beefy.geom
mHeight *= scaleY; mHeight *= scaleY;
} }
public void Scale(T scale) mut
{
Scale(scale, scale);
}
public void ScaleFrom(T scaleX, T scaleY, T centerX, T centerY) mut public void ScaleFrom(T scaleX, T scaleY, T centerX, T centerY) mut
{ {
Offset(-centerX, -centerY); Offset(-centerX, -centerY);

View file

@ -924,6 +924,11 @@ namespace Beefy.gfx
FillRect(x, y + height - thickness, width, thickness); FillRect(x, y + height - thickness, width, thickness);
} }
public void OutlineRect(Rect rect)
{
OutlineRect(rect.mX, rect.mY, rect.mWidth, rect.mHeight);
}
public void FillRectGradient(float x, float y, float width, float height, public void FillRectGradient(float x, float y, float width, float height,
Color colorTopLeft, Color colorTopRight, Color colorBotLeft, Color colorBotRight) Color colorTopLeft, Color colorTopRight, Color colorBotLeft, Color colorBotRight)
{ {