From 6f2c87870081718731cccee678e1e89869826de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Mon, 17 Aug 2020 18:58:43 +0200 Subject: Initial import of version 0.3.2 from the source package. https://sourceforge.net/projects/kpacman/files/kpacman/0.3.2/kpacman-0.3.2.tar.gz MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original package is licenced under GPL 2.0. Signed-off-by: Slávek Banko --- kpacman/bitfont.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 kpacman/bitfont.h (limited to 'kpacman/bitfont.h') diff --git a/kpacman/bitfont.h b/kpacman/bitfont.h new file mode 100644 index 0000000..c12aa0f --- /dev/null +++ b/kpacman/bitfont.h @@ -0,0 +1,31 @@ +#ifndef BITFONT_H +#define BITFONT_H + +#include +#include +#include +#include + +#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 + -- cgit v1.2.1