summaryrefslogtreecommitdiffstats
path: root/kpacman/bitfont.h
blob: 5976a51e45adc832180d47587d2db127827007c9 (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
31
#ifndef BITFONT_H
#define BITFONT_H

#include <ntqstring.h>
#include <ntqbitmap.h>
#include <ntqpixmap.h>
#include <ntqrect.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