rendering update

This commit is contained in:
Jorijn van der Graaf 2026-03-22 21:08:02 +01:00
commit 7fdab4f62b
4 changed files with 33 additions and 49 deletions

View file

@ -30,10 +30,10 @@ export namespace Crafter {
float height;
float offsetX;
float offsetY;
std::int32_t z;
std::uint8_t z;
bool maintainAspectRatio;
Anchor2D() = default;
Anchor2D(float x, float y, float width, float height, float offsetX, float offsetY, std::int32_t z, bool maintainAspectRatio = false);
Anchor2D(float x, float y, float width, float height, float offsetX, float offsetY, std::uint8_t z, bool maintainAspectRatio = false);
};
struct Transform2D {
@ -73,7 +73,6 @@ export namespace Crafter {
scaled.size.y = anchor.height * parent.scaled.size.x;
}
} else {
scaled.size.x = anchor.width * parent.scaled.size.x;
scaled.size.y = anchor.height * parent.scaled.size.y;
}