X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Feditwindow.cpp;h=192c9d2ee30b5bb5736588544af24895a504718c;hb=faaae13292af283e277b0d1480aad54a6e4a2dd6;hp=242d237bb14a877b1038e5af334fd137e641a5a2;hpb=360d040a4727383cc8e78d0b8a3c8151c27d26fc;p=ttedit diff --git a/src/editwindow.cpp b/src/editwindow.cpp index 242d237..192c9d2 100755 --- a/src/editwindow.cpp +++ b/src/editwindow.cpp @@ -71,12 +71,12 @@ QSize EditWindow::sizeHint() const void EditWindow::CreateCursors(void) { - int hotx[10] = { 1, 1, 11, 15, 1, 1, 1, 1, 1, 1 }; - int hoty[10] = { 1, 1, 11, 13, 1, 1, 1, 1, 1, 1 }; - char cursorName[10][48] = { "select", "select-poly", "scroll", "zoom", "add-point", - "add-poly", "del-point", "del-poly", "rotate", "rotate" }; + int hotx[11] = { 1, 1, 11, 15, 1, 1, 1, 1, 1, 1, 1 }; + int hoty[11] = { 1, 1, 11, 13, 1, 1, 1, 1, 1, 1, 1 }; + char cursorName[11][48] = { "select", "select-poly", "scroll", "zoom", "add-point", + "add-poly", "del-point", "del-poly", "rotate", "rotate", "select" }; - for(int i=0; i<10; i++) + for(int i=0; i<11; i++) { QString s; s.sprintf(":/res/cursor-%s.png", cursorName[i]); @@ -382,6 +382,21 @@ WriteLogMsg(" --> [# polys: %u, # points: %u]\n", pts.GetNumPolys(), pts.GetNumP rotationAngle = 0; update(); } + else if (tool == TOOLFlipWinding) + { +// IPoint centroid = pts.GetPolyCentroid(pts.GetPolyForPointNumber(ptHighlight)); +// rotationCenter = QPoint(centroid.x, centroid.y); +// showRotationCenter = true; + pts.InvertPolyDrawSequence(pts.GetPolyForPointNumber(ptHighlight)); + pt = GetAdjustedClientPosition(pts.GetX(ptHighlight), pts.GetY(ptHighlight)); + QCursor::setPos(mapToGlobal(pt)); +// rotationZeroPoint = QPoint(pts.GetX(ptHighlight), pts.GetY(ptHighlight)); +// haveZeroPoint = true; +// rotationAngle = 0; + update(); +// ((TTEdit *)qApp)->charWnd->MakePathFromPoints(&pts); +// ((TTEdit *)qApp)->charWnd->update(); + } } event->accept(); @@ -472,7 +487,7 @@ void EditWindow::mouseMoveEvent(QMouseEvent * event) { // Moving, not dragging... if (tool == TOOLSelect || tool == TOOLDelPt || tool == TOOLAddPt - || tool == TOOLPolySelect || tool == TOOLRotatePoly) + || tool == TOOLPolySelect || tool == TOOLRotatePoly || tool == TOOLFlipWinding) { QPoint pt2 = GetAdjustedMousePosition(event); double closest = 1.0e+99;