This file is indexed.

/usr/include/paraview/vtkPVScalarBarActor.h is in paraview-dev 5.0.1+dfsg1-4.

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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkPVScalarBarActor.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/

/*-------------------------------------------------------------------------
  Copyright 2008 Sandia Corporation.
  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
  the U.S. Government retains certain rights in this software.
-------------------------------------------------------------------------*/

// .NAME vtkPVScalarBarActor - A scalar bar with labels of fixed font.
//
// .SECTION Description
//
// vtkPVScalarBarActor has basically the same functionality as vtkScalarBarActor
// except that the fonts are set to a fixed size and tick labels vary in precision
// before their size is adjusted to meet geometric constraints.
// These changes make it easier to control in ParaView.
//

#ifndef vtkPVScalarBarActor_h
#define vtkPVScalarBarActor_h

#include "vtkScalarBarActor.h"
#include "vtkPVVTKExtensionsRenderingModule.h" // needed for export macro

#include "vtkNew.h" // For ivars
#include "vtkSmartPointer.h" // For ivars
#include <vector> // For ivars

class vtkAxis;
class vtkContextScene;

class VTKPVVTKEXTENSIONSRENDERING_EXPORT vtkPVScalarBarActor : public vtkScalarBarActor
{
public:
  vtkTypeMacro(vtkPVScalarBarActor, vtkScalarBarActor);
  virtual void PrintSelf(ostream &os, vtkIndent indent);
  static vtkPVScalarBarActor *New();

  // Description:
  // The bar aspect ratio (length/width).  Defaults to 20.  Note that this
  // the aspect ratio of the color bar only, not including labels.
  vtkGetMacro(AspectRatio, double);
  vtkSetMacro(AspectRatio, double);

  // Description:
  // If true (the default), the printf format used for the labels will be
  // automatically generated to make the numbers best fit within the widget.  If
  // false, the LabelFormat ivar will be used.
  vtkGetMacro(AutomaticLabelFormat, int);
  vtkSetMacro(AutomaticLabelFormat, int);
  vtkBooleanMacro(AutomaticLabelFormat, int);

  // Description:
  // If true (the default), tick marks will be drawn.
  vtkGetMacro(DrawTickMarks, int);
  vtkSetMacro(DrawTickMarks, int);
  vtkBooleanMacro(DrawTickMarks, int);

  // Description:
  // If true (the default), sub-tick marks will be drawn.
  vtkGetMacro(DrawSubTickMarks, int);
  vtkSetMacro(DrawSubTickMarks, int);
  vtkBooleanMacro(DrawSubTickMarks, int);

  // Description:
  // Set whether the range endpoints (minimum and maximum) are added
  // as labels alongside other value labels.
  vtkGetMacro(AddRangeLabels, int);
  vtkSetMacro(AddRangeLabels, int);
  vtkBooleanMacro(AddRangeLabels, int);

  // Description:
  // Set whether annotions are automatically created according the number
  // of discrete colors. Default is FALSE;
  vtkSetMacro(AutomaticAnnotations, int);
  vtkGetMacro(AutomaticAnnotations, int);
  vtkBooleanMacro(AutomaticAnnotations, int);

  // Description:
  // Set the C-style format string for the range labels.
  vtkGetStringMacro(RangeLabelFormat);
  vtkSetStringMacro(RangeLabelFormat);

  // Description:
  // Add value as annotation label on scalar bar at the given position
  virtual void AddValueLabelIfUnoccluded(
    double value, double pos, double diff);

  // Description:
  // Set the title justification. Valid values are VTK_TEXT_LEFT,
  // VTK_TEXT_CENTERED, and VTK_TEXT_RIGHT.
  vtkGetMacro(TitleJustification, int);
  vtkSetClampMacro(TitleJustification, int, VTK_TEXT_LEFT, VTK_TEXT_RIGHT);

  // Description:
  // Set whether the scalar data range endpoints (minimum and maximum)
  // are added as annotations.
  vtkGetMacro(AddRangeAnnotations, int);
  vtkSetMacro(AddRangeAnnotations, int);
  vtkBooleanMacro(AddRangeAnnotations, int);

  // Description:
  // Release any graphics resources that are being consumed by this actor.
  // The parameter window could be used to determine which graphic
  // resources to release.
  virtual void ReleaseGraphicsResources(vtkWindow*);

  // Description:
  // Overridden to sync internal variables with renderer state.
  int RenderOpaqueGeometry(vtkViewport* viewport);

  // Description:
  // Draw the scalar bar and annotation text to the screen.
  virtual int RenderOverlay(vtkViewport* viewport);

protected:
  vtkPVScalarBarActor();
  ~vtkPVScalarBarActor();

  // Description:
  // These methods override the subclass implementation.
  virtual void PrepareTitleText();
  virtual void ComputeScalarBarThickness();
  virtual void LayoutTitle();
  virtual void ComputeScalarBarLength();
  virtual void LayoutTicks();
  virtual void ConfigureAnnotations();
  virtual void ConfigureTitle();
  virtual void ConfigureTicks();

  // Description:
  // Annotate the min/max values on the scalar bar (in interval/ratio mode).
  //
  // This overrides the subclass implementation.
  virtual void EditAnnotations();

  // Description:
  // Set up the ScalarBar, ScalarBarMapper, and ScalarBarActor based on the
  // current position and orientation of this actor.
  //virtual void PositionScalarBar(const int propSize[2], vtkViewport *viewport);

  // Description:
  // Set up the texture used to render the scalar bar.
  virtual void BuildScalarBarTexture();

  // Description:
  // A convenience function for creating one of the labels.  A text mapper
  // and associated actor are added to LabelMappers and LabelActors
  // respectively.  The index to the newly created entries is returned.
  virtual int CreateLabel(
    double value, int minDigits,
    int targetWidth, int targetHeight, vtkViewport* viewport);

  double AspectRatio;
  int AutomaticLabelFormat;
  int DrawTickMarks;
  int DrawSubTickMarks;
  int AddRangeLabels;

  // Description:
  // Flag indicating whether automatic annotations are computed and shown.
  int AutomaticAnnotations;

  char* RangeLabelFormat;

  vtkTexture* ScalarBarTexture;
  vtkPolyData* TickMarks;
  vtkPolyDataMapper2D* TickMarksMapper;
  vtkActor2D* TickMarksActor;

  // Description:
  // These are used to calculate the tick spacing.
  vtkNew<vtkAxis> TickLayoutHelper;
  vtkNew<vtkContextScene> TickLayoutHelperScene;

  // Description:
  // Space, in pixels, between the labels and the bar itself.  Currently set in
  // PositionTitle.
  int LabelSpace;

  // Description:
  // The justification/alignment of the title.
  int TitleJustification;

  // Description:
  // Flag to add minimum and maximum as annotations
  int AddRangeAnnotations;

private:
  vtkPVScalarBarActor(const vtkPVScalarBarActor &);     // Not implemented.
  void operator=(const vtkPVScalarBarActor &);          // Not implemented.
};

#endif //vtkPVScalarBarActor_h