OSDN Git Service

upgrade to 3.6.1
[jnethack/source.git] / win / Qt4 / qt4glyph.h
1 // Copyright (c) Warwick Allison, 1999.
2 // Qt4 conversion copyright (c) Ray Chason, 2012-2014.
3 // NetHack may be freely redistributed.  See license for details.
4
5 // qt4glyph.h -- class to manage the glyphs in a tile set
6
7 #ifndef QT4GLYPH_H
8 #define QT4GLYPH_H
9
10 namespace nethack_qt4 {
11
12 class NetHackQtGlyphs {
13 public:
14         NetHackQtGlyphs();
15
16         int width() const { return size.width(); }
17         int height() const { return size.height(); }
18         void toggleSize();
19         void setSize(int w, int h);
20
21         void drawGlyph(QPainter&, int glyph, int pixelx, int pixely);
22         void drawCell(QPainter&, int glyph, int cellx, int celly);
23         QPixmap glyph(int glyph);
24
25 private:
26         QImage img;
27         QPixmap pm,pm1, pm2;
28         QSize size;
29         int tiles_per_row;
30 };
31
32 } // namespace nethack_qt4
33
34 #endif