Simplify Drawable code

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2016-10-18 22:06:52 -03:00
parent a844c16657
commit b8b670e0ae
23 changed files with 93 additions and 159 deletions
+5 -4
View File
@@ -44,12 +44,13 @@ public:
void set(const std::vector<Font::ColoredString> &text);
void set(const std::vector<Font::ColoredString> &text, float wrap, Font::AlignMode align);
int add(const std::vector<Font::ColoredString> &text, float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky);
int addf(const std::vector<Font::ColoredString> &text, float wrap, Font::AlignMode align, float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky);
int add(const std::vector<Font::ColoredString> &text, const Matrix4 &m);
int addf(const std::vector<Font::ColoredString> &text, float wrap, Font::AlignMode align, const Matrix4 &m);
void clear();
// Implements Drawable.
virtual void draw(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky);
void draw(const Matrix4 &m) override;
void setFont(Font *f);
Font *getFont() const;
@@ -74,7 +75,7 @@ private:
Font::TextInfo text_info;
bool use_matrix;
bool append_vertices;
Matrix3 matrix;
Matrix4 matrix;
};
void uploadVertices(const std::vector<Font::GlyphVertex> &vertices, size_t vertoffset);