Add Font BoundingBox calculation
This commit is contained in:
@@ -2,16 +2,13 @@
|
||||
|
||||
#include "copium/sampler/Sampler.h"
|
||||
#include "copium/sampler/Glyph.h"
|
||||
#include "copium/util/BoundingBox.h"
|
||||
|
||||
namespace Copium
|
||||
{
|
||||
class Font : public Sampler
|
||||
{
|
||||
CP_DELETE_COPY_AND_MOVE_CTOR(Font);
|
||||
struct GlyphData
|
||||
{
|
||||
|
||||
};
|
||||
private:
|
||||
VkImage image;
|
||||
VkDeviceMemory imageMemory;
|
||||
@@ -27,6 +24,8 @@ namespace Copium
|
||||
|
||||
const Glyph& GetGlyph(char c) const;
|
||||
float GetLineHeight() const;
|
||||
|
||||
BoundingBox GetTextBoundingBox(const std::string& str, float size) const;
|
||||
private:
|
||||
void InitializeTextureImageFromFile(const std::string& filename);
|
||||
void InitializeTextureImageFromData(const uint8_t* rgbaData, int width, int height);
|
||||
|
||||
Reference in New Issue
Block a user