MCPcopy Create free account
hub / github.com/MITK/MITK / CanvasToFunction

Method CanvasToFunction

Modules/QtWidgetsExt/src/QmitkTransferFunctionCanvas.cpp:51–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51std::pair<double, double> QmitkTransferFunctionCanvas::CanvasToFunction(std::pair<int, int> canvasPoint)
52{
53 return std::make_pair(
54 (canvasPoint.first - contentsRect().x()) * (m_Upper - m_Lower) / contentsRect().width() + m_Lower,
55 1.0 - (double)(canvasPoint.second - contentsRect().y()) / contentsRect().height());
56}
57
58void QmitkTransferFunctionCanvas::mouseDoubleClickEvent(QMouseEvent *mouseEvent)
59{

Callers 2

mousePressEventMethod · 0.95
mouseMoveEventMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected