Utility/TextDrawer: Expose lines

This commit is contained in:
Lynix
2016-10-28 17:45:29 +02:00
parent 736b31af1b
commit 38da351e9b
3 changed files with 45 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ namespace Nz
{
public:
struct Glyph;
struct Line;
AbstractTextDrawer() = default;
virtual ~AbstractTextDrawer();
@@ -31,15 +32,24 @@ namespace Nz
virtual std::size_t GetFontCount() const = 0;
virtual const Glyph& GetGlyph(std::size_t index) const = 0;
virtual std::size_t GetGlyphCount() const = 0;
virtual const Line& GetLine(std::size_t index) const = 0;
virtual std::size_t GetLineCount() const = 0;
struct Glyph
{
Color color;
Rectf bounds;
Rectui atlasRect;
Vector2f corners[4];
AbstractImage* atlas;
bool flipped;
};
struct Line
{
Rectf bounds;
std::size_t glyphIndex;
};
};
}