21 #ifndef GLQUANTITATIVEAXIS_H_ 22 #define GLQUANTITATIVEAXIS_H_ 24 #include <tulip/GlAxis.h> 34 class TLP_GL_SCOPE GlQuantitativeAxis :
public GlAxis {
54 GlQuantitativeAxis(
const std::string &axisName,
const Coord &axisBaseCoord,
55 const float axisLength,
const AxisOrientation &axisOrientation,
56 const Color &axisColor,
const bool addArrow =
true,
57 const bool ascendingOrder =
true);
72 void setAxisParameters(
const double min,
const double max,
const unsigned int nbGraduations,
73 const LabelPosition &axisGradsLabelsPosition = LEFT_OR_BELOW,
74 const bool drawFirstLabel =
true);
76 void setAxisParameters(
const long long min,
const long long max,
77 const unsigned long long incrementStep,
78 const LabelPosition &axisGradsLabelsPosition = LEFT_OR_BELOW,
79 const bool drawFirstLabel =
true);
81 void setAxisParameters(
const int min,
const int max,
const unsigned int incrementStep,
82 const LabelPosition &axisGradsLabelsPosition = LEFT_OR_BELOW,
83 const bool drawFirstLabel =
true) {
84 setAxisParameters(static_cast<long long>(min), static_cast<long long>(max),
85 static_cast<unsigned long long>(incrementStep), axisGradsLabelsPosition,
89 void setNbGraduations(
const unsigned int nbGraduations) {
90 this->nbGraduations = nbGraduations;
100 void setLogScale(
const bool logScale,
const unsigned int logBase = 10);
106 void setAscendingOrder(
const bool ascendingOrder) {
107 this->ascendingOrder = ascendingOrder;
115 void updateAxis()
override;
122 Coord getAxisPointCoordForValue(
double value)
const;
129 double getValueForAxisPoint(
const Coord &axisPointCoord);
134 bool hasAscendingOrder()
const {
135 return ascendingOrder;
138 double getAxisMinValue()
const {
142 double getAxisMaxValue()
const {
147 void buildAxisGraduations();
148 void addArrowDrawing();
150 double min, max, scale;
151 double minLog, maxLog;
152 unsigned int nbGraduations;
153 LabelPosition axisGradsLabelsPosition;
157 Coord captionCenterCoord;
159 unsigned int logBase;
161 unsigned long long incrementStep;