useAntialiasing(true), numSelected(0), numHovered(0), shiftDown(false),
ctrlDown(false),
gridBackground(BACKGROUND_MAX_SIZE, BACKGROUND_MAX_SIZE),
- scale(1.0), offsetX(-10), offsetY(-10),// document(Vector(0, 0)),
- gridPixels(0), collided(false)//, toolAction(NULL)
+ scale(1.0), offsetX(-10), offsetY(-10),
+ gridPixels(0), collided(false), hoveringIntersection(false)
{
// document.isTopLevelContainer = true;
//wtf? doesn't work except in c++11??? document = { 0 };
painter.DrawRect(Global::selection);
}
+ if (hoveringIntersection)
+ painter.DrawHandle(intersectionPoint);
+
if (!informativeText.isEmpty())
painter.DrawInformativeText(informativeText);
}
Global::selection.setBottomRight(QPointF(point.x, point.y));
// Only needs to be done here, as mouse down is always preceded by movement
Global::snapPointIsValid = false;
+ hoveringIntersection = false;
// Scrolling...
if (event->buttons() & Qt::MiddleButton)
if (numIntersecting > 0)
{
- QString text = tr("Intersection t=%1, u=%2");
- informativeText = text.arg(t).arg(u);
+ Vector v1 = Geometry::GetPointForParameter((Object *)hover[0], t);
+ Vector v2 = Geometry::GetPointForParameter((Object *)hover[1], u);
+ QString text = tr("Intersection t=%1 (%3, %4), u=%2 (%5, %6)");
+ informativeText = text.arg(t).arg(u).arg(v1.x).arg(v1.y).arg(v2.x).arg(v2.y);
+
+ hoveringIntersection = true;
+ intersectionPoint = v1;
}
}