1 #ifndef SHARED_CURVE_VIEW_H 2 #define SHARED_CURVE_VIEW_H 21 BannerView * bannerView =
nullptr,
View * cursorView =
nullptr,
View * okView =
nullptr);
45 float coordinate,
float lowerBound,
float upperBound,
61 float min(
Axis axis)
const;
62 float max(
Axis axis)
const;
63 float gridUnit(
Axis axis)
const;
65 virtual char * label(
Axis axis,
int index)
const = 0;
66 int numberOfLabels(
Axis axis)
const;
69 void jointDots(
KDContext * ctx,
KDRect rect,
EvaluateModelWithParameter evaluation,
void *
model,
void * context,
float x,
float y,
float u,
float v,
KDColor color,
int maxNumberOfRecursion)
const;
71 void straightJoinDots(
KDContext * ctx,
KDRect rect,
float pxf,
float pyf,
float puf,
float pvf,
KDColor color)
const;
76 void layoutSubviews()
override;
80 int numberOfSubviews()
const override;
81 View * subviewAtIndex(
int index)
override;
87 bool m_mainViewSelected;
float(* EvaluateModelWithParameter)(float t, void *model, void *context)
bool isMainViewSelected() const
void drawGridLines(KDContext *ctx, KDRect rect, Axis axis, float step, KDColor color) const
const SettingsMessageTree model
void setBannerView(View *bannerView)
void drawSegment(KDContext *ctx, KDRect rect, Axis axis, float coordinate, float lowerBound, float upperBound, KDColor color, KDCoordinate thickness=1) const
void drawGrid(KDContext *ctx, KDRect rect) const
void drawAxes(KDContext *ctx, KDRect rect, Axis axis) const
void setOkView(View *okView)
void drawCurve(KDContext *ctx, KDRect rect, EvaluateModelWithParameter evaluation, void *model, void *context, KDColor color, bool colorUnderCurve=false, float colorLowerBound=0.0f, float colorUpperBound=0.0f, bool continuously=false) const
static constexpr KDCoordinate k_labelMargin
void drawLine(KDContext *ctx, KDRect rect, Axis axis, float coordinate, KDColor color, KDCoordinate thickness=1) const
CurveViewCursor * m_curveViewCursor
virtual float samplingRatio() const
void drawLabels(KDContext *ctx, KDRect rect, Axis axis, bool shiftOrigin) const
static constexpr float k_maxNumberOfYGridUnits
static constexpr KDCoordinate k_okMargin
static constexpr int k_externRectMargin
void setCurveViewRange(CurveViewRange *curveViewRange)
static constexpr int k_maxNumberOfXLabels
void drawHistogram(KDContext *ctx, KDRect rect, EvaluateModelWithParameter evaluation, void *model, void *context, float firstBarAbscissa, float barWidth, bool fillBar, KDColor defaultColor, KDColor highlightColor, float highlightLowerBound=INFINITY, float highlightUpperBound=-INFINITY) const
void setCursorView(View *cursorView)
float floatToPixel(Axis axis, float f) const
void computeLabels(Axis axis)
void selectMainView(bool mainViewSelected)
static constexpr float k_maxNumberOfXGridUnits
CurveView(CurveViewRange *curveViewRange=nullptr, CurveViewCursor *curveViewCursor=nullptr, BannerView *bannerView=nullptr, View *cursorView=nullptr, View *okView=nullptr)
void drawDot(KDContext *ctx, KDRect rect, float x, float y, KDColor color, bool oversize=false) const
float pixelToFloat(Axis axis, KDCoordinate p) const
static constexpr KDCoordinate k_labelGraduationLength
static constexpr int k_maxNumberOfYLabels