]> Shamusworld >> Repos - architektonas/blobdiff - src/painter.h
Add small handle rendering, make Informative Text backgrnd more opaque.
[architektonas] / src / painter.h
index 367c7a84e6a4fb4b11a147e7e8198edc183ec832..98c81f3a7e6297955d73f6438044cd1d757ddd01 100644 (file)
@@ -1,7 +1,9 @@
 #ifndef __PAINTER_H__
 #define __PAINTER_H__
 
-#include <QtGui>
+#include <stdint.h>
+#include <QtWidgets>
+#include "rect.h"
 #include "vector.h"
 
 // Forward declarations
@@ -13,30 +15,40 @@ 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);
+               Rect MeasureTextObject(QString text, double size);
                void DrawArc(Vector, double, double, double);
                void DrawEllipse(Vector, double, double);
+               void DrawHandle(Vector);
+               void DrawSmallHandle(Vector);
+               void DrawCross(Vector);
+               void DrawRectCorners(Rect);
+               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);
                static Vector QtToCartesianCoords(Vector);
 
-       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
-
        private:
                QPainter * painter;
 };
 
 #endif // __PAINTER_H__
+