mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 16:20:49 +01:00
[apps] Use curve view window in the abstract class curve view
Change-Id: I2c54cb111944f294e00d45244f23cdda9984bf02
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Graph {
|
||||
constexpr KDColor GraphView::k_gridColor;
|
||||
|
||||
GraphView::GraphView(FunctionStore * functionStore, GraphWindow * graphWindow) :
|
||||
CurveView(),
|
||||
CurveView(graphWindow),
|
||||
m_cursorView(CursorView()),
|
||||
m_xCursorPosition(-1.0f),
|
||||
m_yCursorPosition(-1.0f),
|
||||
@@ -60,10 +60,6 @@ void GraphView::reloadCursor() {
|
||||
layoutSubviews();
|
||||
}
|
||||
|
||||
float GraphView::gridUnit(Axis axis) const {
|
||||
return (axis == Axis::Horizontal ? m_graphWindow->xGridUnit() : m_graphWindow->yGridUnit());
|
||||
}
|
||||
|
||||
char * GraphView::label(Axis axis, int index) const {
|
||||
return (axis == Axis::Horizontal ? (char *)m_xLabels[index] : (char *)m_yLabels[index]);
|
||||
}
|
||||
@@ -199,16 +195,6 @@ void GraphView::drawGrid(KDContext * ctx, KDRect rect) const {
|
||||
drawGridLines(ctx, rect, Axis::Vertical, m_graphWindow->yGridUnit(), k_gridColor);
|
||||
}
|
||||
|
||||
float GraphView::min(Axis axis) const {
|
||||
assert(axis == Axis::Horizontal || axis == Axis::Vertical);
|
||||
return (axis == Axis::Horizontal ? m_graphWindow->xMin() : m_graphWindow->yMin());
|
||||
}
|
||||
|
||||
float GraphView::max(Axis axis) const {
|
||||
assert(axis == Axis::Horizontal || axis == Axis::Vertical);
|
||||
return (axis == Axis::Horizontal ? m_graphWindow->xMax() : m_graphWindow->yMax());
|
||||
}
|
||||
|
||||
float GraphView::evaluateCurveAtAbscissa(void * curve, float abscissa) const {
|
||||
Function * f = (Function *)curve;
|
||||
return f->evaluateAtAbscissa(abscissa, m_context);
|
||||
|
||||
Reference in New Issue
Block a user