]> Shamusworld >> Repos - architektonas/blob - src/painter.h
Added missing files. D'oh!
[architektonas] / src / painter.h
1 #ifndef __PAINTER_H__
2 #define __PAINTER_H__
3
4 #include <QtGui>
5 #include "vector.h"
6
7 // Forward declarations
8
9 class Painter
10 {
11         public:
12                 Painter(QPainter * p = 0);
13                 ~Painter();
14
15                 void SetRenderHint(int);
16                 void SetBrush(QBrush);
17                 void SetFont(QFont);
18                 void SetPen(QPen);
19                 void DrawAngledText(Vector, double, QString);
20                 void DrawArc(Vector, double, double, double);
21                 void DrawEllipse(Vector, double, double);
22                 void DrawLine(int, int, int, int);
23                 void DrawLine(Vector, Vector);
24                 void DrawPoint(int, int);
25                 void DrawRoundedRect(QRectF, double, double);
26                 void DrawText(QRectF, int, QString);
27
28         public:
29                 Vector CartesianToQtCoords(Vector);
30                 Vector QtCoordsToCartesian(Vector);
31
32         public:
33                 // Class variables
34                 static Vector origin;           // The window origin, not location of the origin
35                 static double zoom;                     // Window zoom factor
36                 static Vector screenSize;       // Width & height of the window we're drawing on
37
38         private:
39                 QPainter * painter;
40 };
41
42 #endif  // __PAINTER_H__