summaryrefslogtreecommitdiffstats
path: root/kpacman/bitfont.h
blob: 029383e1f311cc401ccc17ddb6bf43fd029fd8a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef BITFONT_H
#define BITFONT_H

#include <tqstring.h>
#include <tqbitmap.h>
#include <tqpixmap.h>
#include <tqrect.h>

#include "colors.h"

class Bitfont
{
public:
    Bitfont(TQString fontname, uchar firstChar, uchar lastChar);

    TQPixmap text(TQString str, TQColor fg = BLACK, TQColor bg = TQColor());
    TQRect rect(TQString str);
    int width();
    int height();
    uchar firstChar();
    uchar lastChar();
private:
    TQBitmap font;
    int fontWidth;
    int fontHeight;
    uchar fontFirstChar;
    uchar fontLastChar;
};

#endif // BITFONT_H