X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fpainter.h;h=d460ebcc2c9c349dd3782989150ada6b2cab1fdc;hb=3c890e51a9763ffcee49e15753453a7da248272b;hp=5e868d75764250e457d161f118f2ad8fd7ad4b36;hpb=f507d97c1b1118834a70332f5f79d8479a6964c0;p=architektonas diff --git a/src/painter.h b/src/painter.h index 5e868d7..d460ebc 100644 --- a/src/painter.h +++ b/src/painter.h @@ -3,10 +3,9 @@ #include #include +#include "rect.h" #include "vector.h" -//#define SCREEN_ZOOM (1.0 / 4.0) - // Forward declarations class Painter @@ -23,18 +22,25 @@ class Painter void SetFont(QFont); 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 DrawPaddedRect(QRectF); - void DrawRect(QRectF); - 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); @@ -43,12 +49,6 @@ 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; };