22 #ifndef GLQUANTITATIVEAXIS_H_
23 #define GLQUANTITATIVEAXIS_H_
25 #include <tulip/GlAxis.h>
34 class TLP_GL_SCOPE GlQuantitativeAxis :
public GlAxis {
49 GlQuantitativeAxis(
const std::string &axisName,
const Coord &axisBaseCoord,
const float axisLength,
50 const AxisOrientation &axisOrientation,
const Color &axisColor,
51 const bool addArrow =
true,
const bool ascendingOrder =
true);
62 void setAxisParameters(
const double min,
const double max,
const unsigned int nbGraduations,
63 const LabelPosition &axisGradsLabelsPosition = LEFT_OR_BELOW,
const bool drawFirstLabel =
true);
66 void setAxisParameters(
const int min,
const int max,
const unsigned int incrementStep,
67 const LabelPosition &axisGradsLabelsPosition = LEFT_OR_BELOW,
const bool drawFirstLabel =
true);
70 void setNbGraduations(
const unsigned int nbGraduations) {
71 this->nbGraduations = nbGraduations;
81 void setLogScale(
const bool logScale,
const unsigned int logBase = 10);
86 void setAscendingOrder(
const bool ascendingOrder) {
87 this->ascendingOrder = ascendingOrder;
101 Coord getAxisPointCoordForValue(
double value)
const;
108 double getValueForAxisPoint(
const Coord &axisPointCoord);
113 bool hasAscendingOrder()
const {
114 return ascendingOrder;
117 double getAxisMinValue()
const {
121 double getAxisMaxValue()
const {
127 void buildAxisGraduations();
128 void addArrowDrawing();
130 double min, max, scale;
131 double minLog, maxLog;
132 unsigned int nbGraduations;
133 LabelPosition axisGradsLabelsPosition;
137 Coord captionCenterCoord;
139 unsigned int logBase;
141 unsigned int incrementStep;