fps counter

This commit is contained in:
Eduardo Bart
2011-04-07 05:38:29 -03:00
parent 937070b3e0
commit f3eaf3f726
8 changed files with 97 additions and 38 deletions

View File

@@ -39,9 +39,21 @@ public:
/// Load font from file
bool load(const std::string &file);
/// Simple text render
/// Simple text render starting at pos
void renderText(const Point& pos, const std::string& text);
/// Render text delimited by screenCoords rect
void renderText(const Rect& screenCoords, const std::string& text);
/** Advanced text render
* screenCoords is the rect that will be filled on the screen
* startRenderPosition is the postion to start rendering relative to the text rect
*/
void renderText(const Rect& screenCoords, const Point& startRenderPosition, const std::string& text);
/// Simulate render and calculate text size
Size calculateTextSize(const std::string& text);
/*
enum EAlign {
ALIGN_TOP = 1 << 0,
@@ -60,9 +72,6 @@ public:
void renderText(const Rect& screenCoords, EAlign align, const std::string& text);
*/
/// Render a text
int renderGlyph(const Point& pos, int glyph);
private:
int m_lineHeight;
int m_cursorSize;