Changed project structure.

This commit is contained in:
2024-01-14 09:38:57 -08:00
parent 7dcd903140
commit 039ab8cc0f
240 changed files with 696 additions and 573 deletions

View File

@@ -0,0 +1,46 @@
#pragma once
#include "ehs/EHS.h"
#include "ehs/Array.h"
#include "Glyph.h"
#include "ehs/Anchor.h"
#include "ehs/io/img/Img.h"
#include "ehs/io/model/Mesh.h"
namespace ehs
{
class FontAtlas : public Img
{
private:
UInt_64 glyphScale;
Array<Glyph> glyphs;
public:
FontAtlas();
FontAtlas(const Str_8& filePath);
FontAtlas(FontAtlas&& fa) noexcept;
FontAtlas(const FontAtlas& fa);
FontAtlas& operator=(FontAtlas&& fa) noexcept;
FontAtlas& operator=(const FontAtlas& fa);
UInt_64 GetGlyphScale() const;
Glyph GetGlyph(Char_32 code) const;
Vec2_f CalculateSize(const Str_8& text) const;
float CalculateWidth(const Str_8& text) const;
float CalculateHeight(const Str_8& text) const;
UInt_64 CalculateIndexAtPoint(const Str_8& text, const Vec2_f& point) const;
Mesh Generate(Anchor anchor, const Str_8& text) const;
};
}