X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fpainter.h;h=d460ebcc2c9c349dd3782989150ada6b2cab1fdc;hb=3c890e51a9763ffcee49e15753453a7da248272b;hp=52da1d5a212548f30c5aaebe98d87238cb2a3653;hpb=83e22355362af43b5beaafbccf101fa8b35bb12f;p=architektonas diff --git a/src/painter.h b/src/painter.h index 52da1d5..d460ebc 100644 --- a/src/painter.h +++ b/src/painter.h @@ -1,7 +1,9 @@ #ifndef __PAINTER_H__ #define __PAINTER_H__ -#include +#include +#include +#include "rect.h" #include "vector.h" // Forward declarations @@ -13,29 +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 DrawHLine(double); + void DrawVLine(double); void DrawPoint(int, int); + void DrawRoundedRect(Rect, double, double); void DrawRoundedRect(QRectF, double, double); - void DrawText(QRectF, int, QString); + void DrawPaddedRect(Rect); + void DrawRect(Rect); + void DrawText(Rect, 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; };