23 #ifndef __vtkGL2PSUtilities_h
24 #define __vtkGL2PSUtilities_h
26 #include "vtkObject.h"
27 #include "vtkRenderingGL2PSModule.h"
33 class vtkRenderWindow;
34 class vtkTextProperty;
41 void PrintSelf(ostream& os, vtkIndent indent)
43 this->Superclass::PrintSelf(os, indent);
48 static void DrawString(
const char *str, vtkTextProperty *tprop,
double pos[3]);
51 static const char * TextPropertyToPSFontName(vtkTextProperty *tprop);
55 static int TextPropertyToGL2PSAlignment(vtkTextProperty *tprop);
61 return vtkGL2PSUtilities::RenderWindow;
68 static void Draw3DPath(vtkPath *path, vtkMatrix4x4 *actorMatrix,
69 double rasterPos[3],
unsigned char actorColor[4]);
80 static void DrawPath(vtkPath *path,
double rasterPos[3],
double windowPos[2],
81 unsigned char rgba[4],
double scale[2] = NULL,
82 double rotateAngle = 0.0,
float strokeWidth = -1);
89 return vtkGL2PSUtilities::TextAsPath;
97 {
return vtkGL2PSUtilities::PointSizeFactor; }
99 {
return vtkGL2PSUtilities::LineWidthFactor; }
103 friend class vtkGL2PSExporter;
105 static void StartExport();
106 static void FinishExport();
109 { vtkGL2PSUtilities::PointSizeFactor = f; }
112 { vtkGL2PSUtilities::LineWidthFactor = f; }
116 vtkGL2PSUtilities::TextAsPath = b;
121 vtkGL2PSUtilities::RenderWindow = renWin;
124 static void DrawPathPS(vtkPath *path,
double rasterPos[3],
125 double windowPos[2],
unsigned char rgba[4],
126 double scale[2] = NULL,
double rotateAngle = 0.0,
127 float strokeWidth = -1);
128 static void DrawPathPDF(vtkPath *path,
double rasterPos[3],
129 double windowPos[2],
unsigned char rgba[4],
130 double scale[2] = NULL,
double rotateAngle = 0.0,
131 float strokeWidth = -1);
132 static void DrawPathSVG(vtkPath *path,
double rasterPos[3],
133 double windowPos[2],
unsigned char rgba[4],
134 double scale[2] = NULL,
double rotateAngle = 0.0,
135 float strokeWidth = -1);
144 static vtkRenderWindow *RenderWindow;
145 static bool TextAsPath;
146 static float PointSizeFactor;
147 static float LineWidthFactor;
151 static void ProjectPoint(
double point[3], vtkMatrix4x4 *actorMatrix = NULL);
152 static void ProjectPoint(
double point[4], vtkMatrix4x4 * transformMatrix,
153 double viewportOrigin[2],
double halfWidth,
154 double halfHeight,
double zfact1,
double zfact2);
155 static void ProjectPoints(vtkPoints *points,
156 vtkMatrix4x4 *actorMatrix = NULL);
Helper functions for using GL2PS within VTK.
static float GetPointSizeFactor()
static bool GetTextAsPath()
static void SetLineWidthFactor(float f)
static void SetRenderWindow(vtkRenderWindow *renWin)
static float GetLineWidthFactor()
static void SetTextAsPath(bool b)
static vtkRenderWindow * GetRenderWindow()
static void SetPointSizeFactor(float f)