frodo-wii/font.hh

32 lines
496 B
C++
Raw Normal View History

2009-11-26 18:40:24 +01:00
#ifndef __FONT_HH__
#define __FONT_HH__
2009-11-26 19:29:10 +01:00
#include <SDL.h>
2009-11-26 18:40:24 +01:00
class Font
{
public:
virtual int getHeight(const char *str) = 0;
virtual int getHeight(const char c)
{
char buf[2] = {c, '\0'};
return this->getHeight(buf);
}
virtual int getWidth(const char *str) = 0;
virtual int getWidth(const char c)
{
char buf[2] = {c, '\0'};
return this->getWidth(buf);
}
2009-11-26 19:29:10 +01:00
virtual void draw(SDL_Surface *where, const char *msg,
int x, int y, int w, int h) = 0;
2009-11-26 18:40:24 +01:00
};
#endif /* __FONT_HH__ */