X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Feditwindow.h;fp=src%2Feditwindow.h;h=11a5b0720eb66feb8734ff3a3a8ffe809a0efb29;hb=7fde5a077bc9bbce28662fa2e5aa5043f3b4747f;hp=652535941fd35d21e45fdd477beed0f3f14e0d4f;hpb=0c01fa32c7e0629ae61992e0419f03724fc18487;p=ttedit diff --git a/src/editwindow.h b/src/editwindow.h index 6525359..11a5b07 100755 --- 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 { @@ -34,25 +36,29 @@ class EditWindow: public QWidget 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 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; + double scale; // Window scaling factor + int32_t offsetX, offsetY; // Window offsets + 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__