mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 07:40:42 +01:00
24 lines
526 B
C++
24 lines
526 B
C++
#include "complex_graph_view.h"
|
|
|
|
using namespace Shared;
|
|
|
|
namespace Calculation {
|
|
|
|
ComplexGraphView::ComplexGraphView(ComplexModel * complexModel) :
|
|
CurveView(complexModel),
|
|
m_complex(complexModel)
|
|
{
|
|
}
|
|
|
|
void ComplexGraphView::drawRect(KDContext * ctx, KDRect rect) const {
|
|
ctx->fillRect(rect, KDColorWhite);
|
|
drawAxes(ctx, rect);
|
|
drawDot(ctx, rect, m_complex->x(), m_complex->y(), KDColorBlack);
|
|
drawLabel(ctx, rect, Axis::Horizontal, m_complex->x());
|
|
drawLabel(ctx, rect, Axis::Vertical, m_complex->y());
|
|
|
|
|
|
}
|
|
|
|
}
|