Blame view

build6/epsilon-master/apps/statistics/box_axis_view.cpp 516 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  #include "box_axis_view.h"
  #include <assert.h>
  
  using namespace Shared;
  
  namespace Statistics {
  
  void BoxAxisView::drawRect(KDContext * ctx, KDRect rect) const {
    ctx->fillRect(rect, KDColorWhite);
    KDRect lineRect = KDRect(0, k_axisMargin, bounds().width(), 1);
    ctx->fillRect(lineRect, KDColorBlack);
    drawLabels(ctx, rect, Axis::Horizontal, false, false, true, k_axisMargin);
  }
  
  char * BoxAxisView::label(Axis axis, int index) const {
    return axis == Axis::Vertical ? nullptr : (char *)m_labels[index];
  }
  
  }