This file is indexed.

/usr/include/vtk-7.1/vtkOpenGLGL2PSHelper.h is in libvtk7-dev 7.1.1+dfsg1-2.

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
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkOpenGLGL2PSHelper.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.

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

/**
 * @class   vtkOpenGLGL2PSHelper
 * @brief   Access GL2PS functionality.
 *
 *
 * This class provides convenience functions that can be used to draw into a
 * GL2PS context. Link to vtkRenderingGL2PSOpenGL2 to bring in the
 * vtkOpenGLGL2PSHelperImpl class, the object factory override that implements
 * this interface.
*/

#ifndef vtkOpenGLGL2PSHelper_h
#define vtkOpenGLGL2PSHelper_h

#include "vtkRenderingOpenGL2Module.h" // For export macro
#include "vtkObject.h"

class vtkActor;
class vtkImageData;
class vtkMatrix4x4;
class vtkPath;
class vtkRenderer;
class vtkRenderWindow;
class vtkTextProperty;
class vtkTransformFeedback;

class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLGL2PSHelper: public vtkObject
{
public:
  static vtkOpenGLGL2PSHelper* New();
  vtkAbstractTypeMacro(vtkOpenGLGL2PSHelper, vtkObject)
  virtual void PrintSelf(ostream &os, vtkIndent indent);

  //@{
  /**
   * The global instance. Only set during export.
   */
  static vtkOpenGLGL2PSHelper* GetInstance();
  static void SetInstance(vtkOpenGLGL2PSHelper *);
  //@}

  //@{
  /**
   * Get the renderwindow that's being exported.
   */
  vtkGetMacro(RenderWindow, vtkRenderWindow*)
  //@}

  enum State
  {
    Inactive = 0, //! No export active
    Background, //! Rendering rasterized props for the background.
    Capture //! Capturing vectorized objects.
  };

  //@{
  /**
   * Get the current export state. Vector images are rendered in two passes:
   * First, all non-vectorizable props are rendered, and the resulting image
   * is inserted as a raster image into the background of the exported file
   * (ActiveState == Background). Next, all vectorizable props are drawn
   * and captured into GL2PS, where they are drawn over the background image.
   * Vectorizable props should not draw themselves during the background pass,
   * and use the vtkOpenGLGL2PSHelper API to draw themselves during the capture
   * pass.
   */
  vtkGetMacro(ActiveState, State)
  //@}

  //@{
  /**
   * Set/Get the current point size.
   */
  vtkSetMacro(PointSize, float)
  vtkGetMacro(PointSize, float)
  //@}

  //@{
  /**
   * Set/Get the current line width.
   */
  vtkSetMacro(LineWidth, float)
  vtkGetMacro(LineWidth, float)
  //@}

  //@{
  /**
   * Set/Get the current line stipple pattern per OpenGL convention. Default is
   * 0xffff.
   */
  vtkSetMacro(LineStipple, unsigned short)
  vtkGetMacro(LineStipple, unsigned short)
  //@}

  //@{
  /**
   * Parse the vertex information in tfc and inject primitives into GL2PS.
   * ren is used to obtain viewport information to complete the vertex
   * tranformation into pixel coordinates, and act/col are used to color the
   * vertices when tfc does not contain color information.
   */
  virtual void ProcessTransformFeedback(vtkTransformFeedback *tfc,
                                        vtkRenderer *ren, vtkActor *act) = 0;
  virtual void ProcessTransformFeedback(vtkTransformFeedback *tfc,
                                        vtkRenderer *ren,
                                        unsigned char col[4]) = 0;
  virtual void ProcessTransformFeedback(vtkTransformFeedback *tfc,
                                        vtkRenderer *ren,
                                        float col[4]) = 0;
  //@}

  /**
   * Format the text in str according to tprop and instruct GL2PS to draw it at
   * pixel coordinate pos. Background depth is the z value for the background
   * quad, and should be in NDC space.
   * The drawing is always done in the overlay plane.
   * @sa TextAsPath
   */
  virtual void DrawString(const std::string &str, vtkTextProperty *tprop,
                          double pos[3], double backgroundDepth,
                          vtkRenderer *ren) = 0;

  /**
   * Generate PS, EPS, or SVG markup from a vtkPath object, and then inject it
   * into the output using the gl2psSpecial command. The path is translated
   * uniformly in the scene by windowPos. It is scaled by scale and rotated
   * counter-clockwise by rotateAngle. The rasterPos is in world coordinates
   * and determines clipping and depth. If scale is NULL, no scaling is done.
   * If strokeWidth is positive, the path will be stroked with the indicated
   * width. If zero or negative, the path will be filled (default).
   * The label string is inserted into the GL2PS output at the beginning of the
   * path specification as a comment on supported backends.
   */
  virtual void DrawPath(vtkPath *path, double rasterPos[3], double windowPos[2],
                        unsigned char rgba[4], double scale[2] = NULL,
                        double rotateAngle = 0.0, float strokeWidth = -1,
                        const char *label = NULL) = 0;

  /**
   * Transform the path using the actor's matrix and current GL state, then
   * draw it to GL2PS. The label string is inserted into the GL2PS output at the
   * beginning of the path specification as a comment on supported backends.
   */
  virtual void Draw3DPath(vtkPath *path, vtkMatrix4x4 *actorMatrix,
                          double rasterPos[3], unsigned char actorColor[4],
                          vtkRenderer *ren, const char *label = NULL) = 0;

  /**
   * Draw the image at pos.
   * Image must be RGB or RGBA with float scalars.
   */
  virtual void DrawImage(vtkImageData *image, double pos[3]) = 0;

protected:
  friend class vtkOpenGLGL2PSExporter;

  vtkOpenGLGL2PSHelper();
  ~vtkOpenGLGL2PSHelper();

  vtkSetMacro(ActiveState, State)
  vtkSetMacro(TextAsPath, bool)
  vtkSetMacro(RenderWindow, vtkRenderWindow*) // Doesn't ref count, not needed.
  vtkSetMacro(PointSizeFactor, float)
  vtkSetMacro(LineWidthFactor, float)

  static vtkOpenGLGL2PSHelper *Instance;

  vtkRenderWindow *RenderWindow;
  State ActiveState;
  bool TextAsPath;
  float PointSize;
  float LineWidth;
  float PointSizeFactor;
  float LineWidthFactor;
  unsigned short LineStipple;

private:
  vtkOpenGLGL2PSHelper(const vtkOpenGLGL2PSHelper &) VTK_DELETE_FUNCTION;
  void operator=(const vtkOpenGLGL2PSHelper &) VTK_DELETE_FUNCTION;
};

#endif // vtkOpenGLGL2PSHelper_h