VTK  9.7.1
vtkAxisExtended.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
16 #ifndef vtkAxisExtended_h
17 #define vtkAxisExtended_h
18 #endif
19 
20 #include "vtkChartsCoreModule.h" // For export macro
21 #include "vtkObject.h"
22 #include "vtkVector.h" // Needed for vtkVector
23 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class VTKCHARTSCORE_EXPORT VTK_MARSHALAUTO vtkAxisExtended : public vtkObject
27 {
28 public:
29  vtkTypeMacro(vtkAxisExtended, vtkObject);
30  static vtkAxisExtended* New();
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
37  static double Simplicity(int qIndex, int qLength, int j, double lmin, double lmax, double lstep);
38 
43  static double SimplicityMax(int qIndex, int qLength, int j);
44 
49  static double Coverage(double dmin, double dmax, double lmin, double lmax);
50 
54  static double CoverageMax(double dmin, double dmax, double span);
55 
60  static double Density(int k, double m, double dmin, double dmax, double lmin, double lmax);
61 
66  static double DensityMax(int k, double m);
67 
71  static double FormatLegibilityScore(double n, int format);
72 
76  static int FormatStringLength(int format, double n, int precision);
77 
83  vtkVector3d GenerateExtendedTickLabels(double dmin, double dmax, double m, double scaling);
84 
86 
89  vtkGetMacro(FontSize, int);
90  vtkSetMacro(FontSize, int);
92 
93  vtkGetMacro(DesiredFontSize, int);
94  vtkSetMacro(DesiredFontSize, int);
95 
96  vtkGetMacro(Precision, int);
97  vtkSetMacro(Precision, int);
98  vtkGetMacro(LabelFormat, int);
99  vtkSetMacro(LabelFormat, int);
100 
101  vtkGetMacro(Orientation, int);
102  vtkSetMacro(Orientation, int);
103 
104  vtkGetMacro(IsAxisVertical, bool);
105  vtkSetMacro(IsAxisVertical, bool);
106 
107 protected:
108  vtkAxisExtended();
109  ~vtkAxisExtended() override;
110 
114  double Legibility(
115  double lmin, double lmax, double lstep, double scaling, vtkVector<int, 3>& parameters);
116 
118  int FontSize;
124 
125 private:
126  vtkAxisExtended(const vtkAxisExtended&) = delete;
127  void operator=(const vtkAxisExtended&) = delete;
128 };
129 VTK_ABI_NAMESPACE_END
abstract base class for most VTK objects
Definition: vtkObject.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
extended axis tick positioning
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...