X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Feditwindow.h;h=77104bd4d442287b704108ee3ce44492da24da01;hb=c7d608c4fcdd370274964cc861b674c2fae69468;hp=652535941fd35d21e45fdd477beed0f3f14e0d4f;hpb=0c01fa32c7e0629ae61992e0419f03724fc18487;p=ttedit diff --git a/src/editwindow.h b/src/editwindow.h old mode 100755 new mode 100644 index 6525359..77104bd --- a/src/editwindow.h +++ b/src/editwindow.h @@ -12,6 +12,8 @@ #include #include "toolwindow.h" // For ToolType enum #include "glyphpoints.h" +#include "painter.h" + class EditWindow: public QWidget { @@ -32,27 +34,29 @@ class EditWindow: public QWidget private: void CreateCursors(void); - QPoint GetAdjustedMousePosition(QMouseEvent *); - QPoint GetAdjustedClientPosition(int x, int y); - void DrawGlyph(QPainter & p, GlyphPoints & glyph); - void DrawGlyphPoly(QPainter & p, GlyphPoints & glyph, uint16_t poly); + void DrawGlyph(Painter & p, GlyphPoints & glyph); + void DrawGlyphPoly(Painter & p, GlyphPoints & glyph, uint16_t poly); + void DrawGlyphSegment(Painter & p, IPoint p1, IPoint p2, IPoint p3); + void ClearSelection(void); public: QImage image; - QPoint pt, ptOffset, ptPrevious; - double scale; // Window scaling factor - int32_t offsetX, offsetY; // Window offsets - ToolType tool; // Current tool - GlyphPoints pts; // Glyph point structure + Vector pt, ptOffset, ptPrevious, addPoint; + bool addPointOnCurve; + ToolType tool; // Current tool + GlyphPoints pts; // Glyph point structure int32_t ptHighlight, oldPtHighlight, ptNextHighlight, oldPtNextHighlight; int16_t polyHighlight, oldPolyHighlight; bool polyFirstPoint; bool showRotationCenter, haveZeroPoint; - QPoint rotationCenter, rotationZeroPoint, rotationCurrentPoint; + Vector rotationCenter, rotationZeroPoint, rotationCurrentPoint; double rotationAngle; ToolWindow * toolPalette; - QCursor cur[11]; + QCursor cur[12]; + bool selectedPoints[65536]; // Potential memory leak :-O + QRect selection; + bool selectionInProgress; }; #endif // __EDITWINDOW_H__