/usr/include/vtk-6.3/vtkScalarBarActorInternal.h is in libvtk6-dev 6.3.0+dfsg1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | #ifndef vtkScalarBarActorInternal_h
#define vtkScalarBarActorInternal_h
// VTK-HeaderTest-Exclude: vtkScalarBarActorInternal.h
#include "vtkColor.h" // for AnnotationColors, LabelColorMap, and tuples
#include "vtkSmartPointer.h" // for "smart vectors"
#include "vtkStdString.h" // for LabelMap
#include <map>
#include <vector>
class vtkActor2D;
class vtkCellArray;
class vtkTextActor;
class vtkPoints;
class vtkPolyData;
class vtkPolyDataMapper2D;
class vtkUnsignedCharArray;
/// A vector of smart pointers.
template<class T>
class vtkSmartVector : public std::vector<vtkSmartPointer<T> >
{
public:
/**\brief Convert to an array of "dumb" pointers for functions
* that need a contiguous array pointer as input.
*/
T** PointerArray()
{
// NB: This is relatively evil. But much cheaper than copying the array.
// It assumes the compiler won't pad the class.
return reinterpret_cast<T**>(&((*this)[0]));
}
};
/// A structure to represent pixel coordinates for text or swatch bounds.
struct vtkScalarBarBox
{
/// The position of the box in viewport (pixel) coordinates.
vtkTuple<int,2> Posn;
/**\brief Size of the box, stored as (thickness, length) not (width, height).
*
* Thickness is a measure of the box size perpendicular to the long axis of the scalar bar.
* When the scalar bar orientation is horizontal, thickness measures height.
* Length is a measure of the box size parallel to the long axis of the scalar bar.
* When the scalar bar orientation is horizontal, length measures width.
*/
vtkTuple<int,2> Size;
};
/// Internal state for the scalar bar actor shared with subclasses.
class vtkScalarBarActorInternal
{
public:
vtkScalarBarActorInternal()
{
this->Viewport = 0;
this->SwatchColors = 0;
this->SwatchPts = 0;
this->Polys = 0;
this->AnnotationBoxes = 0;
this->AnnotationBoxesMapper = 0;
this->AnnotationBoxesActor = 0;
this->AnnotationLeaders = 0;
this->AnnotationLeadersMapper = 0;
this->AnnotationLeadersActor = 0;
this->NanSwatch = 0;
this->NanSwatchMapper = 0;
this->NanSwatchActor = 0;
}
// Define types for smart vectors containing various base classes.
typedef vtkSmartVector<vtkTextActor> ActorVector;
// Other vector container types.
typedef std::vector<double> DoubleVector;
typedef std::vector<vtkColor3ub> ColorVector;
/**\brief Cache of dimensions fixed during geometry assembly.
*
* Only valid within methods invoked by vtkScalarBarActor::RebuildLayout().
*/
//@{
vtkViewport* Viewport;
/// The thickness and length of the (square) NaN swatch.
double NanSwatchSize;
/// Space in pixels between swatches when in indexed lookup mode.
double SwatchPad;
/// Number of annotated values (at least
/// lut->GetNumberOfAnnotatedValues(), but maybe more)
int NumNotes;
/// Number of color swatches to draw for either the continuous or
/// categorical scalar bar, not including a NaN swatch.
int NumColors;
/// Either NumColors or NumColors + 1, depending on whether the NaN
/// swatch is to be drawn.
int NumSwatches;
/// Permutation of (0, 1) that transforms thickness,length into
/// width,height.
int TL[2]; // VERTICAL => TL={0,1}, HORIZONTAL => TL={1,0}, Size[TL[0]] == width, Size[TL[1]] == height
/// Point coordinates for the scalar bar actor
vtkPoints* SwatchPts;
/// Cells representing color swatches (for the scalar bar actor)
vtkCellArray* Polys;
/// Colors of swatches in \a Polys
vtkUnsignedCharArray* SwatchColors;
/// The bounding box of the entire scalar bar frame.
vtkScalarBarBox Frame;
/// The bounding box of the scalar bar (excluding NaN swatch)
vtkScalarBarBox ScalarBarBox;
/// The bounding box of the NaN swatch
vtkScalarBarBox NanBox;
/// The bounding box of tick mark anchor points (tick labels are not
/// fully contained)
vtkScalarBarBox TickBox;
/// The bounding box of the scalar bar title text.
vtkScalarBarBox TitleBox;
/// Map from viewport coordinates to label text of each annotation.
std::map<double,vtkStdString> Labels;
/// Map from viewport coordinates to the leader line color of each
/// annotation.
std::map<double,vtkColor3ub> LabelColors;
//@}
/// Cache of classes holding geometry assembled and ready for rendering.
//@{
ActorVector TextActors;
vtkPolyData* AnnotationBoxes;
vtkPolyDataMapper2D* AnnotationBoxesMapper;
vtkActor2D* AnnotationBoxesActor;
vtkPolyData* AnnotationLeaders;
vtkPolyDataMapper2D* AnnotationLeadersMapper;
vtkActor2D* AnnotationLeadersActor;
ActorVector AnnotationLabels;
DoubleVector AnnotationAnchors;
ColorVector AnnotationColors;
vtkPolyData* NanSwatch;
vtkPolyDataMapper2D* NanSwatchMapper;
vtkActor2D* NanSwatchActor;
//@}
};
#endif // vtkScalarBarActorInternal_h
|