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 long long min,
const long long max,
const unsigned long long incrementStep,
67 const LabelPosition &axisGradsLabelsPosition = LEFT_OR_BELOW,
const bool drawFirstLabel =
true);
69 void setAxisParameters(
const int min,
const int max,
const unsigned int incrementStep,
70 const LabelPosition &axisGradsLabelsPosition = LEFT_OR_BELOW,
const bool drawFirstLabel =
true) {
71 setAxisParameters((
long long) min, (
long long) max, (
unsigned long long) incrementStep, axisGradsLabelsPosition, drawFirstLabel);
74 void setNbGraduations(
const unsigned int nbGraduations) {
75 this->nbGraduations = nbGraduations;
85 void setLogScale(
const bool logScale,
const unsigned int logBase = 10);
90 void setAscendingOrder(
const bool ascendingOrder) {
91 this->ascendingOrder = ascendingOrder;
105 Coord getAxisPointCoordForValue(
double value)
const;
112 double getValueForAxisPoint(
const Coord &axisPointCoord);
117 bool hasAscendingOrder()
const {
118 return ascendingOrder;
121 double getAxisMinValue()
const {
125 double getAxisMaxValue()
const {
131 void buildAxisGraduations();
132 void addArrowDrawing();
134 double min, max, scale;
135 double minLog, maxLog;
136 unsigned int nbGraduations;
137 LabelPosition axisGradsLabelsPosition;
141 Coord captionCenterCoord;
143 unsigned int logBase;
145 unsigned long long incrementStep;