20 #ifndef vtkPDFContextDevice2D_h 21 #define vtkPDFContextDevice2D_h 23 #include "vtkIOExportModule.h" 44 void SetHaruObjects(
void *doc,
void *page);
49 int nc_comps = 0) VTK_OVERRIDE;
50 void DrawLines(
float *f,
int n,
unsigned char *colors = 0,
51 int nc_comps = 0) VTK_OVERRIDE;
52 void DrawPoints(
float *points,
int n,
unsigned char* colors = 0,
53 int nc_comps = 0) VTK_OVERRIDE;
54 void DrawPointSprites(
vtkImageData *sprite,
float *points,
int n,
55 unsigned char *colors = 0,
56 int nc_comps = 0) VTK_OVERRIDE;
57 void DrawMarkers(
int shape,
bool highlight,
float *points,
int n,
58 unsigned char *colors = 0,
int nc_comps = 0) VTK_OVERRIDE;
59 void DrawQuad(
float *,
int) VTK_OVERRIDE;
60 void DrawQuadStrip(
float *,
int) VTK_OVERRIDE;
61 void DrawPolygon(
float *,
int) VTK_OVERRIDE;
62 void DrawColoredPolygon(
float *points,
int numPoints,
63 unsigned char *colors =
nullptr,
64 int nc_comps = 0) VTK_OVERRIDE;
65 void DrawEllipseWedge(
float x,
float y,
float outRx,
float outRy,
67 float stopAngle) VTK_OVERRIDE;
68 void DrawEllipticArc(
float x,
float y,
float rX,
float rY,
69 float startAngle,
float stopAngle) VTK_OVERRIDE;
72 float bounds[4]) VTK_OVERRIDE;
75 float bounds[4]) VTK_OVERRIDE;
76 void ComputeJustifiedStringBounds(const
char*
string,
77 float bounds[4]) VTK_OVERRIDE;
78 void DrawMathTextString(
float *point, const
vtkStdString &str) VTK_OVERRIDE;
81 void SetColor4(
unsigned char color[4]) VTK_OVERRIDE;
83 void SetPointSize(
float size) VTK_OVERRIDE;
84 void SetLineWidth(
float width) VTK_OVERRIDE;
85 void DrawPolyData(
float p[2],
float scale,
vtkPolyData* polyData,
88 void SetLineType(
int type) VTK_OVERRIDE;
92 void PushMatrix() VTK_OVERRIDE;
93 void PopMatrix() VTK_OVERRIDE;
94 void SetClipping(
int *x) VTK_OVERRIDE;
95 void EnableClipping(
bool enable) VTK_OVERRIDE;
99 ~vtkPDFContextDevice2D() VTK_OVERRIDE;
101 void PushGraphicsState();
102 void PopGraphicsState();
104 void ApplyPenState();
105 void ApplyStrokeColor(
unsigned char *
color,
int numComps);
106 void ApplyLineWidth(
float width);
107 void ApplyLineType(
int type);
110 void ApplyPenStateAsFill();
111 void ApplyBrushState();
112 void ApplyTextPropertyState();
113 void ApplyFillColor(
unsigned char *color,
int numComps);
114 void ApplyFillAlpha(
unsigned char alpha);
115 void Fill(
bool stroke = false);
116 void FillEvenOdd(
bool stroke = false);
118 void BeginClipPathForTexture();
119 void RegisterTexturePoints(
float *
data,
int numPoints);
126 void DrawEllipticArcSegments(
float x,
float y,
float rX,
float rY,
127 float startAngle,
float stopAngle,
129 int GetNumberOfArcIterations(
float rX,
float rY,
130 float startAngle,
float stopAngle);
132 void DrawCrossMarkers(
bool highlight,
float *points,
int n,
133 unsigned char *colors,
int nc_comps);
134 void DrawPlusMarkers(
bool highlight,
float *points,
int n,
135 unsigned char *colors,
int nc_comps);
136 void DrawSquareMarkers(
bool highlight,
float *points,
int n,
137 unsigned char *colors,
int nc_comps);
138 void DrawCircleMarkers(
bool highlight,
float *points,
int n,
139 unsigned char *colors,
int nc_comps);
140 void DrawDiamondMarkers(
bool highlight,
float *points,
int n,
141 unsigned char *colors,
int nc_comps);
143 void DrawPath(
vtkPath *path,
float x,
float y);
150 float ComputeTextPosition(
float pos[2], const
vtkStdString &str,
155 void ApplyTransform();
158 static
void Matrix3ToMatrix4(
vtkMatrix3x3 *mat3,
double mat4[16]);
159 static
void Matrix4ToMatrix3(
double mat4[16],
vtkMatrix3x3 *mat3);
160 static
void Matrix4ToMatrix3(
double mat4[16],
double mat3[9]);
167 static
void Matrix4ToHPDFTransform(const
double mat4[16],
float hpdfMat[6]);
168 static
void Matrix3ToHPDFTransform(const
double mat4[9],
float hpdfMat[6]);
169 static
void HPDFTransformToMatrix3(
float a,
float b,
float c,
float d,
170 float x,
float y,
double mat3[9]);
182 bool IsInTexturedFill;
183 float TextureBounds[4];
186 vtkPDFContextDevice2D(const vtkPDFContextDevice2D&) VTK_DELETE_FUNCTION;
187 void operator=(const vtkPDFContextDevice2D&) VTK_DELETE_FUNCTION;
190 #endif // vtkPDFContextDevice2D_h
Wrapper around std::string to keep symbols short.
concrete dataset representing a path defined by Bezier curves.
abstract specification for renderers
static vtkContextDevice2D * New()
concrete dataset represents vertices, lines, polygons, and triangle strips
virtual void DrawPoly(float *points, int n, unsigned char *colors=0, int nc_comps=0)=0
Draw a poly line using the points - fastest code path due to memory layout of the coordinates...
Some derived classes for the different colors commonly used.
a simple class to control print indentation
topologically and geometrically regular array of data
Abstract class for drawing 2D primitives.
vtkContextDevice2D implementation for use with vtkPDFExporter.
dynamic, self-adjusting array of unsigned char
Allocate and hold a VTK object.
represent and manipulate 3x3 transformation matrices
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
String class that stores Unicode text.