rendering update
This commit is contained in:
parent
bc97c13a0b
commit
7fdab4f62b
4 changed files with 33 additions and 49 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue