X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fpainter.h;h=5b11e25aadead93a1c418627fe3abbe50e02b332;hb=0e8f4edf80206248f0ad87a966d69d9ec9da3d2f;hp=af591b8e0d59740513151dfe1c232b112ef20644;hpb=84afe881653a02a16b19d4da37435b8701b1a826;p=architektonas diff --git a/src/painter.h b/src/painter.h index af591b8..5b11e25 100644 --- a/src/painter.h +++ b/src/painter.h @@ -1,11 +1,11 @@ #ifndef __PAINTER_H__ #define __PAINTER_H__ +#include #include +#include "rect.h" #include "vector.h" -//#define SCREEN_ZOOM (1.0 / 4.0) - // Forward declarations class Painter @@ -15,13 +15,19 @@ 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, 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 DrawCross(Vector); + void DrawRectCorners(Rect); void DrawArrowHandle(Vector, double); void DrawArrowToLineHandle(Vector, double); void DrawLine(int, int, int, int); @@ -39,14 +45,9 @@ class Painter 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__ +