10 CurveView(store, nullptr, bannerView, nullptr),
13 m_highlightedBarStart(
NAN),
14 m_highlightedBarEnd(
NAN)
24 KDRect dirtyZone(
KDRect(pixelLowerBound, 0, pixelUpperBound-pixelLowerBound,
37 drawHistogram(ctx, rect, EvaluateHistogramAtAbscissa, m_store, &totalSize, m_store->
firstDrawnBarAbscissa(), m_store->
barWidth(),
true,
Palette::Select,
Palette::YellowDark, m_highlightedBarStart, m_highlightedBarEnd);
44 if (m_highlightedBarStart !=
start || m_highlightedBarEnd != end) {
46 m_highlightedBarStart =
start;
47 m_highlightedBarEnd = end;
52 char * HistogramView::label(Axis axis,
int index)
const {
56 return (
char *)m_labels[index];
59 float HistogramView::EvaluateHistogramAtAbscissa(
float abscissa,
void *
model,
void * context) {
60 Store * store = (Store *)
model;
61 float * totalSize = (
float *)context;
62 return store->heightOfBarAtValue(abscissa)/(*totalSize);
static constexpr KDColor YellowDark
bool isMainViewSelected() const
const SettingsMessageTree model
void markRectAsDirty(KDRect rect)
double sumOfColumn(int i)
void drawAxes(KDContext *ctx, KDRect rect, Axis axis) const
double firstDrawnBarAbscissa()
void drawRect(KDContext *ctx, KDRect rect) const override
constexpr KDColor KDColorWhite
void drawLabels(KDContext *ctx, KDRect rect, Axis axis, bool shiftOrigin) const
static constexpr KDColor Select
static constexpr KDColor GreyMiddle
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 fillRect(KDRect rect, KDColor color)
float floatToPixel(Axis axis, float f) const
void setHighlight(float start, float end)
KDCoordinate height() const