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

Method FunctionToCanvas

Modules/QtWidgetsExt/src/QmitkTransferFunctionCanvas.cpp:44–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44std::pair<int, int> QmitkTransferFunctionCanvas::FunctionToCanvas(std::pair<double, double> functionPoint)
45{
46 return std::make_pair(
47 (int)((functionPoint.first - m_Lower) / (m_Upper - m_Lower) * contentsRect().width()) + contentsRect().x(),
48 (int)(contentsRect().height() * (1 - functionPoint.second)) + contentsRect().y());
49}
50
51std::pair<double, double> QmitkTransferFunctionCanvas::CanvasToFunction(std::pair<int, int> canvasPoint)
52{

Callers 4

paintEventMethod · 0.80
GetNearHandleMethod · 0.80
paintEventMethod · 0.80
GetNearHandleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected