32 #ifndef __vtkContext2D_h
33 #define __vtkContext2D_h
41 class vtkTextProperty;
78 bool GetBufferIdMode()
const;
87 void BufferIdModeEnd();
90 void DrawLine(
float x1,
float y1,
float x2,
float y2);
93 void DrawLine(
float p[4]);
100 void DrawPoly(
float *x,
float *y,
int n);
109 void DrawPoly(
float *points,
int n);
117 void DrawPoly(
float *points,
int n,
118 unsigned char *colors,
int nc_comps);
122 void DrawPoint(
float x,
float y);
125 void DrawPoints(
float *x,
float *y,
int n);
134 void DrawPoints(
float *points,
int n);
149 void DrawPointSprites(
vtkImageData *sprite,
float *points,
int n,
150 unsigned char *colors,
int nc_comps);
156 void DrawPointSprites(
vtkImageData *sprite,
float *points,
int n);
159 void DrawRect(
float x,
float y,
float w,
float h);
164 void DrawQuad(
float x1,
float y1,
float x2,
float y2,
165 float x3,
float y3,
float x4,
float y4);
166 void DrawQuad(
float *p);
172 void DrawQuadStrip(
float *p,
int n);
177 void DrawPolygon(
float *x,
float *y,
int n);
186 void DrawPolygon(
float *points,
int n);
190 void DrawEllipse(
float x,
float y,
float rx,
float ry);
198 void DrawWedge(
float x,
float y,
float outRadius,
199 float inRadius,
float startAngle,
210 void DrawEllipseWedge(
float x,
float y,
float outRx,
float outRy,
211 float inRx,
float inRy,
float startAngle,
220 void DrawArc(
float x,
float y,
float r,
float startAngle,
228 void DrawEllipticArc(
float x,
float y,
float rX,
float rY,
float startAngle,
238 void DrawImage(
float x,
float y,
float scale,
vtkImageData *image);
251 void DrawStringRect(
vtkPoints2D *rect,
const char*
string);
257 void DrawString(
float x,
float y,
const vtkStdString &
string);
260 void DrawString(
vtkPoints2D *point,
const char*
string);
261 void DrawString(
float x,
float y,
const char*
string);
271 void ComputeStringBounds(
const vtkStdString &
string,
float bounds[4]);
274 void ComputeStringBounds(
const char*
string,
vtkPoints2D *bounds);
275 void ComputeStringBounds(
const char*
string,
float bounds[4]);
282 void ApplyPen(
vtkPen *pen);
302 void ApplyTextProp(vtkTextProperty *prop);
305 vtkTextProperty* GetTextProp();
334 static int FloatToInt(
float x);
366 float tol = 0.00390625;
367 tol = (x >= 0 ? tol : -tol);
368 return static_cast<int>(x + tol);
371 #endif //__vtkContext2D_h
Wrapper around vtkstd::string to keep symbols short.
vtkAbstractContextBufferId * BufferId
abstract base class for most VTK objects
static int FloatToInt(float x)
window superclass for vtkRenderWindow
Class for drawing 2D primitives to a graphical context.
provides a brush that fills shapes drawn by vtkContext2D.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
represent and manipulate 2D points
topologically and geometrically regular array of data
Abstract class for drawing 2D primitives.
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
vtkContextDevice2D * Device
dynamic, self-adjusting array of unsigned char
2D array of ids, used for picking.
vtkTransform2D * Transform
String class that stores Unicode text.