mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 17:50:04 +01:00
[apps] Implement InteractiveCurveViewController::isCursorVisible
It was a pure virtual method implemented in derived classes Shared::FunctionGraphController, Regression::GraphController. InteractiveCurveViewRange does not need anymore to hold CurveViewCursor * m_cursor.
This commit is contained in:
committed by
Émilie Feral
parent
8629254d9a
commit
67f9f79322
@@ -208,12 +208,6 @@ void InteractiveCurveViewRange::panToMakePointVisible(float x, float y, float to
|
||||
}
|
||||
}
|
||||
|
||||
bool InteractiveCurveViewRange::isCursorVisible(float topMarginRatio, float rightMarginRatio, float bottomMarginRation, float leftMarginRation) {
|
||||
float xRange = m_xMax - m_xMin;
|
||||
float yRange = m_yMax - m_yMin;
|
||||
return m_cursor->x() >= m_xMin + leftMarginRation*xRange && m_cursor->x() <= m_xMax - rightMarginRatio*xRange && m_cursor->y() >= m_yMin + bottomMarginRation*yRange && m_cursor->y() <= m_yMax - topMarginRatio*yRange;
|
||||
}
|
||||
|
||||
float InteractiveCurveViewRange::clipped(float x, bool isMax) {
|
||||
float maxF = isMax ? k_upperMaxFloat : k_lowerMaxFloat;
|
||||
float minF = isMax ? -k_lowerMaxFloat : -k_upperMaxFloat;
|
||||
|
||||
Reference in New Issue
Block a user