This file is indexed.

/usr/include/vtk-6.3/vtkGL2PSUtilities.h is in libvtk6-dev 6.3.0+dfsg1-11build1.

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

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

=========================================================================*/
// .NAME vtkGL2PSUtilities - Helper functions for using GL2PS within VTK
// .SECTION Description
// vtkGL2PSUtilities implements some static helper function that simplify
// calling GL2PS routines on VTK objects. This class is meant for internal use
// only and is subject to change.

#ifndef vtkGL2PSUtilities_h
#define vtkGL2PSUtilities_h

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

class vtkImageData;
class vtkMatrix4x4;
class vtkPath;
class vtkPoints;
class vtkRenderWindow;
class vtkTextProperty;

class VTKRENDERINGGL2PS_EXPORT vtkGL2PSUtilities : public vtkObject
{
public:
  static vtkGL2PSUtilities *New();
  vtkTypeMacro(vtkGL2PSUtilities, vtkObject)
  void PrintSelf(ostream& os, vtkIndent indent)
  {
    this->Superclass::PrintSelf(os, indent);
  }

  // Description:
  // Format the text in str according to tprop and instruct GL2PS to draw it at
  // world coordinate pos. Background depth is the z value for the background
  // quad, and should be in NDC space.
  static void DrawString(const char *str, vtkTextProperty *tprop, double pos[3],
                         double backgroundDepth);

  // Description:
  // Translate the tprop's fontname into a Postscript font name.
  static const char * TextPropertyToPSFontName(vtkTextProperty *tprop);

  // Description:
  // Convert the alignment hint in tprop to a GL2PS text alignment constant.
  static int TextPropertyToGL2PSAlignment(vtkTextProperty *tprop);

  // Description:
  // Get the current RenderWindow that is being exported
  static vtkRenderWindow *GetRenderWindow()
  {
    return vtkGL2PSUtilities::RenderWindow;
  }

  // Description:
  // 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.
  static void Draw3DPath(vtkPath *path, vtkMatrix4x4 *actorMatrix,
                         double rasterPos[3], unsigned char actorColor[4],
                         const char *label = NULL);
  // Description:
  // 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.
  static 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);

  // Description:
  // Get whether all text will be exported as paths.
  static bool GetTextAsPath()
  {
    return vtkGL2PSUtilities::TextAsPath;
  }

  // Description:
  // Get a scaling factor for the point size or line width used by GL2PS.
  // Default value: 5/7.
  static float GetPointSizeFactor()
    { return vtkGL2PSUtilities::PointSizeFactor; }
  static float GetLineWidthFactor()
    { return vtkGL2PSUtilities::LineWidthFactor; }

protected:
  friend class vtkGL2PSExporter;

  static void StartExport();
  static void FinishExport();

  static void SetPointSizeFactor(float f)
    { vtkGL2PSUtilities::PointSizeFactor = f; }

  static void SetLineWidthFactor(float f)
    { vtkGL2PSUtilities::LineWidthFactor = f; }

  static void SetTextAsPath(bool b)
  {
    vtkGL2PSUtilities::TextAsPath = b;
  }

  static void SetRenderWindow(vtkRenderWindow *renWin)
  {
    vtkGL2PSUtilities::RenderWindow = renWin;
  }

  static void DrawPathPS(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);
  static void DrawPathPDF(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);
  static void DrawPathSVG(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);

  vtkGL2PSUtilities() {}
  ~vtkGL2PSUtilities() {}

private:
  vtkGL2PSUtilities(const vtkGL2PSUtilities &); // Not implemented
  void operator=(const vtkGL2PSUtilities&); // Not implemented

  static vtkRenderWindow *RenderWindow;
  static bool TextAsPath;
  static float PointSizeFactor;
  static float LineWidthFactor;

  // Description:
  // Project the point from world coordinates into device coordinates.
  static void ProjectPoint(double point[3], vtkMatrix4x4 *actorMatrix = NULL);
  static void ProjectPoint(double point[4], vtkMatrix4x4 * transformMatrix,
                           double viewportOrigin[2], double halfWidth,
                           double halfHeight, double zfact1, double zfact2);
  static void ProjectPoints(vtkPoints *points,
                            vtkMatrix4x4 *actorMatrix = NULL);

  // Description:
  // Unproject the point from device coordinates into world coordinates.
  // Input Z coordinate should be in NDC space.
  static void UnprojectPoint(double point[4], vtkMatrix4x4 *invTransformMatrix,
                             double viewportOrigin[2], double halfWidth,
                             double halfHeight, double zfact1, double zfact2);
  static void UnprojectPoints(double *points3D, vtkIdType numPoints,
                              vtkMatrix4x4 *actorMatrix = NULL);
};

#endif