Add Font BoundingBox calculation

This commit is contained in:
Thraix
2023-05-10 22:53:34 +02:00
parent 35ae3a13d2
commit 94d4aa9356
10 changed files with 108 additions and 19 deletions
@@ -0,0 +1,25 @@
#include "copium/util/BoundingBox.h"
namespace Copium
{
BoundingBox::BoundingBox()
: l{0.0f}, b{0.0f}, r{0.0f}, t{0.0f}
{}
BoundingBox::BoundingBox(float all)
: l{all}, b{all}, r{all}, t{all}
{}
BoundingBox::BoundingBox(float l, float b, float r, float t)
: l{l}, b{b}, r{r}, t{t}
{}
BoundingBox::BoundingBox(glm::vec2 lb, glm::vec2 rt)
: lb{lb}, rt{rt}
{}
glm::vec2 BoundingBox::GetSize() const
{
return rt - lb;
}
}