Math: Rework Box and Rect classes

This commit is contained in:
SirLynix
2022-12-18 14:57:14 +01:00
parent 811194bb97
commit 830eee78a8
28 changed files with 242 additions and 642 deletions

View File

@@ -347,7 +347,7 @@ namespace Nz
glyph.flipped = fontGlyph.flipped;
glyph.renderOrder = renderOrder;
glyph.bounds.Set(fontGlyph.aabb);
glyph.bounds = Rectf(fontGlyph.aabb);
if (lineWrap && ShouldLineWrap(glyph.bounds.width))
AppendNewLine(font, characterSize, lineSpacingOffset, m_lastSeparatorGlyph, m_lastSeparatorPosition);
@@ -458,7 +458,7 @@ namespace Nz
AppendNewLine(font, characterSize, lineSpacingOffset, m_lastSeparatorGlyph, m_lastSeparatorPosition);
glyph.atlas = nullptr;
glyph.bounds.Set(m_drawPos.x, m_lines.back().bounds.y, advance, lineHeight);
glyph.bounds = Rectf(m_drawPos.x, m_lines.back().bounds.y, advance, lineHeight);
glyph.corners[0].Set(glyph.bounds.GetCorner(RectCorner::LeftTop));
glyph.corners[1].Set(glyph.bounds.GetCorner(RectCorner::RightTop));