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,22 @@
#pragma once
#include <glm/glm.hpp>
namespace Copium
{
struct BoundingBox
{
union
{
struct { float l; float b; float r; float t; };
struct { glm::vec2 lb; glm::vec2 rt; };
struct { glm::vec4 lbrt; };
};
BoundingBox();
BoundingBox(float all);
BoundingBox(float l, float b, float r, float t);
BoundingBox(glm::vec2 lb, glm::vec2 rt);
glm::vec2 GetSize() const;
};
}