Diffstat (limited to 'noncore/games/kpacman/bitfont.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/games/kpacman/bitfont.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/noncore/games/kpacman/bitfont.h b/noncore/games/kpacman/bitfont.h new file mode 100644 index 0000000..c12aa0f --- a/dev/null +++ b/noncore/games/kpacman/bitfont.h @@ -0,0 +1,31 @@ +#ifndef BITFONT_H +#define BITFONT_H + +#include <qstring.h> +#include <qbitmap.h> +#include <qpixmap.h> +#include <qrect.h> + +#include "colors.h" + +class Bitfont +{ +public: + Bitfont(QString fontname, uchar firstChar, uchar lastChar); + + QPixmap text(QString str, QColor fg = BLACK, QColor bg = QColor()); + QRect rect(QString str); + int width(); + int height(); + uchar firstChar(); + uchar lastChar(); +private: + QBitmap font; + int fontWidth; + int fontHeight; + uchar fontFirstChar; + uchar fontLastChar; +}; + +#endif // BITFONT_H + |