X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fpainter.h;h=e89f045b7d55a16eb852eb38996e90e2a9b3d777;hb=eb39f1bb5e6518c5dc4f4dbd3c88912a97192e95;hp=d82c00078fba42e294b877ffb5791f843343ae18;hpb=9d5d4488ba75c407709556a7ed56b8d16e21834e;p=architektonas diff --git a/src/painter.h b/src/painter.h index d82c000..e89f045 100644 --- a/src/painter.h +++ b/src/painter.h @@ -1,11 +1,11 @@ #ifndef __PAINTER_H__ #define __PAINTER_H__ -#include +#include +#include +#include "rect.h" #include "vector.h" -#define SCREEN_ZOOM (1.0 / 8.0) - // Forward declarations class Painter @@ -15,30 +15,39 @@ 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(QRectF, double, double); + void DrawPaddedRect(QRectF); + void DrawRect(QRectF); void DrawText(QRectF, int, QString); - void DrawArrowhead(Vector, Vector); + 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; };