]> Shamusworld >> Repos - architektonas/blobdiff - src/painter.h
Lines respond to mouse movement, added Text rendering.
[architektonas] / src / painter.h
index 52da1d5a212548f30c5aaebe98d87238cb2a3653..5e868d75764250e457d161f118f2ad8fd7ad4b36 100644 (file)
@@ -1,9 +1,12 @@
 #ifndef __PAINTER_H__
 #define __PAINTER_H__
 
-#include <QtGui>
+#include <stdint.h>
+#include <QtWidgets>
 #include "vector.h"
 
+//#define SCREEN_ZOOM  (1.0 / 4.0)
+
 // Forward declarations
 
 class Painter
@@ -13,18 +16,28 @@ class Painter
                ~Painter();
 
                void SetRenderHint(int);
+               void SetPen(QPen);
+               void SetPen(uint32_t, float size = 0, int style = 0);
                void SetBrush(QBrush);
+               void SetBrush(uint32_t);
                void SetFont(QFont);
-               void SetPen(QPen);
-               void DrawAngledText(Vector, double, QString);
+               void DrawAngledText(Vector, double, QString, double);
+               void DrawTextObject(Vector, QString, double, double angle = 0);
                void DrawArc(Vector, double, double, double);
                void DrawEllipse(Vector, double, double);
                void DrawHandle(Vector);
+               void DrawArrowHandle(Vector, double);
+               void DrawArrowToLineHandle(Vector, double);
                void DrawLine(int, int, int, int);
                void DrawLine(Vector, Vector);
                void DrawPoint(int, int);
                void DrawRoundedRect(QRectF, double, double);
+               void DrawPaddedRect(QRectF);
+               void DrawRect(QRectF);
                void DrawText(QRectF, int, QString);
+               void DrawArrowhead(Vector, Vector, double);
+               void DrawCrosshair(Vector);
+               void DrawInformativeText(QString);
 
        public:
                static Vector CartesianToQtCoords(Vector);
@@ -32,9 +45,9 @@ class Painter
 
        public:
                // Class variables
-               static Vector origin;           // The window origin, not location of the origin
-               static double zoom;                     // Window zoom factor
-               static Vector screenSize;       // Width & height of the window we're drawing on
+//             static Vector origin;           // The window origin, not location of the origin
+//             static double zoom;                     // Window zoom factor
+//             static Vector screenSize;       // Width & height of the window we're drawing on
 
        private:
                QPainter * painter;