51 return expectedScale == scale;
63 childScale = thisScale / (otherScale * scale);
69 childScale = (otherScale * scale) / thisScale;
74 uint32_t expectedWidth =
static_cast<uint32_t
>(
77 uint32_t expectedHeight =
static_cast<uint32_t
>(
81 if (rootA->
width != expectedWidth || rootA->
height != expectedHeight) {
87 childScale = (otherScale * scale) / thisScale;
93 childScale = (otherScale * scale) / thisScale;
96 childRoot->
parent = newRoot;
121 uint32_t expectedWidth =
static_cast<uint32_t
>(root->
width * scale.
width.
toFloat());
124 return (expectedWidth == w && expectedHeight == h);
float toFloat() const noexcept
bool setFixed() const noexcept
const SizeNode * getRoot() const noexcept
FractionScale2D getScaleToRoot() const noexcept
bool isConnected(const SizeNode *other) const noexcept
FractionScale2D getRelativeScale(const SizeNode *other) const noexcept
bool isSizeDetermined() const noexcept
bool isSameSize(const SizeNode *other) const noexcept
virtual ~SizeNode()=default
FractionScale2D scaleToParent
SizeNode(uint32_t w, uint32_t h) noexcept
SizeNode * findRoot() const noexcept
bool unite(SizeNode *other, const FractionScale2D &scale=FractionScale2D()) const noexcept
bool setFixedSize(uint32_t w, uint32_t h) const noexcept
bool getComputedSize(uint32_t &w, uint32_t &h) const noexcept