X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FFont.h;h=d435266e084d7476378996d19ce0451ca643bd29;hb=5cca794c5b6549b7750c88b5c2217d659fa963dd;hp=b981946642925a10980d48532a89d9d3065afb05;hpb=f552d26f537af9fa48255bd71cdc1a0a1b860bac;p=l2e.git diff --git a/src/graphics/Font.h b/src/graphics/Font.h index b981946..d435266 100644 --- a/src/graphics/Font.h +++ b/src/graphics/Font.h @@ -1,15 +1,8 @@ -/* - * Font.h - * - * Created on: Aug 8, 2012 - * Author: holy - */ - #ifndef GRAPHICS_FONT_H_ #define GRAPHICS_FONT_H_ #include "Sprite.h" -#include "../geometry/Vector.h" +#include "../math/Vector.h" #include @@ -29,12 +22,15 @@ public: public: int CharWidth() const { return sprite->Width(); } int CharHeight() const { return sprite->Height(); } - void DrawChar(char c, SDL_Surface *dest, const geometry::Vector &position) const; - void DrawString(const char *s, SDL_Surface *dest, const geometry::Vector &position, int maxChars = 0) const; - void DrawStringRight(const char *s, SDL_Surface *dest, const geometry::Vector &position, int maxChars = 0) const; - void DrawDigit(int d, SDL_Surface *dest, const geometry::Vector &position) const; - void DrawNumber(int n, SDL_Surface *dest, const geometry::Vector &position, int digits = 0) const; - void DrawNumberRight(int n, SDL_Surface *dest, const geometry::Vector &position, int digits = 0) const; + int StringWidth(const char *) const; + int StringHeight(const char *) const; + + void DrawChar(char c, SDL_Surface *dest, const math::Vector &position) const; + void DrawString(const char *s, SDL_Surface *dest, const math::Vector &position, int maxWidth = 0) const; + void DrawStringRight(const char *s, SDL_Surface *dest, const math::Vector &position, int maxWidth = 0) const; + void DrawDigit(int d, SDL_Surface *dest, const math::Vector &position) const; + void DrawNumber(int n, SDL_Surface *dest, const math::Vector &position, int digits = 0) const; + void DrawNumberRight(int n, SDL_Surface *dest, const math::Vector &position, int digits = 0) const; public: void SetSprite(const Sprite *s) { sprite = s; } @@ -53,4 +49,4 @@ private: } -#endif /* GRAPHICS_FONT_H_ */ +#endif