#552 Linked Views : Draw a cross hair marker

This commit is contained in:
Magne Sjaastad 2016-12-15 18:45:10 +01:00
parent 2b17366310
commit 4583dbf3b1

View File

@ -422,10 +422,13 @@ void RiuViewer::paintOverlayItems(QPainter* painter)
if (mainCamera()->project(displayCoord, &screenCoords))
{
int translatedMousePosY = height() - screenCoords.y();
QPoint pos(screenCoords.x(), translatedMousePosY);
QLabel test("x");
test.render(painter, pos);
QPoint centerPos(screenCoords.x(), translatedMousePosY);
// Draw a cross hair marker
int markerHalfLength = 6;
painter->drawLine(centerPos.x(), centerPos.y() - markerHalfLength, centerPos.x(), centerPos.y() + markerHalfLength);
painter->drawLine(centerPos.x() - markerHalfLength, centerPos.y(), centerPos.x() + markerHalfLength, centerPos.y());
}
}
}