Changeset 2953 for trunk/packages/vizservers/nanovis/Axis.h
- Timestamp:
- Apr 9, 2012, 10:18:09 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/Axis.h
r2923 r2953 2 2 #ifndef AXIS_H 3 3 #define AXIS_H 4 5 #include <stdlib.h> 4 6 5 7 #include <cmath> … … 45 47 }; 46 48 47 /* 48 * ---------------------------------------------------------------------- 49 * 50 * Ticks -- 51 * 52 * Structure containing information where the ticks (major or 53 * minor) will be displayed on the graph. 54 * 55 * ---------------------------------------------------------------------- 49 /** 50 * Class containing information where the ticks (major or 51 * minor) will be displayed on the graph. 56 52 */ 57 53 class Ticks … … 182 178 183 179 /** 184 * Structurecontains options controlling how the axis will be180 * Class contains options controlling how the axis will be 185 181 * displayed. 186 182 */ … … 212 208 } 213 209 210 bool firstMajor(TickIter& iter) 211 { 212 return _major.firstTick(iter); 213 } 214 215 bool firstMinor(TickIter& iter) 216 { 217 return _minor.firstTick(iter); 218 } 219 214 220 void resetRange(); 215 221 … … 218 224 void setScale(double min, double max); 219 225 220 double scale() 226 double scale() const 221 227 { 222 228 return _scale; 223 229 } 224 230 225 double range() 231 double range() const 226 232 { 227 233 return _range; 228 234 } 229 235 230 bool firstMajor(TickIter& iter)231 {232 return _major.firstTick(iter);233 }234 235 bool firstMinor(TickIter& iter)236 {237 return _minor.firstTick(iter);238 }239 240 236 void getDataLimits(double& min, double& max) 241 237 { 242 238 min = _valueMin, max = _valueMax; 239 } 240 241 double min() const 242 { 243 return _min; 244 } 245 246 void min(double min) 247 { 248 _reqMin = min; 249 } 250 251 double max() const 252 { 253 return _max; 254 } 255 256 void max(double max) 257 { 258 _reqMax = max; 259 } 260 261 void setLimits(double min, double max) 262 { 263 _reqMin = min, _reqMax = max; 264 } 265 266 void unsetLimits() 267 { 268 min(NAN), max(NAN); 243 269 } 244 270 … … 284 310 } 285 311 _title = strdup(title); 286 }287 288 double min()289 {290 return _min;291 }292 293 void min(double min)294 {295 _reqMin = min;296 }297 298 double max()299 {300 return _max;301 }302 303 void max(double max)304 {305 _reqMax = max;306 }307 308 void setLimits(double min, double max)309 {310 _reqMin = min, _reqMax = max;311 }312 313 void unsetLimits()314 {315 min(NAN), max(NAN);316 312 } 317 313
Note: See TracChangeset
for help on using the changeset viewer.