32 #ifndef vtkContext2D_h
33 #define vtkContext2D_h
80 bool GetBufferIdMode()
const;
89 void BufferIdModeEnd();
92 void DrawLine(
float x1,
float y1,
float x2,
float y2);
95 void DrawLine(
float p[4]);
102 void DrawPoly(
float *x,
float *y,
int n);
111 void DrawPoly(
float *
points,
int n);
119 void DrawPoly(
float *
points,
int n,
120 unsigned char *colors,
int nc_comps);
129 void DrawLines(
float *
points,
int n);
132 void DrawPoint(
float x,
float y);
135 void DrawPoints(
float *x,
float *y,
int n);
144 void DrawPoints(
float *
points,
int n);
160 unsigned char *colors,
int nc_comps);
175 virtual void DrawMarkers(
int shape,
bool highlight,
float *
points,
int n,
176 unsigned char *colors,
int nc_comps);
177 virtual void DrawMarkers(
int shape,
bool highlight,
float *
points,
int n);
184 void DrawRect(
float x,
float y,
float w,
float h);
189 void DrawQuad(
float x1,
float y1,
float x2,
float y2,
190 float x3,
float y3,
float x4,
float y4);
191 void DrawQuad(
float *p);
197 void DrawQuadStrip(
float *p,
int n);
202 void DrawPolygon(
float *x,
float *y,
int n);
211 void DrawPolygon(
float *
points,
int n);
215 void DrawEllipse(
float x,
float y,
float rx,
float ry);
223 void DrawWedge(
float x,
float y,
float outRadius,
235 void DrawEllipseWedge(
float x,
float y,
float outRx,
float outRy,
245 void DrawArc(
float x,
float y,
float r,
float startAngle,
253 void DrawEllipticArc(
float x,
float y,
float rX,
float rY,
float startAngle,
276 void DrawStringRect(
vtkPoints2D *rect,
const char*
string);
282 void DrawString(
float x,
float y,
const vtkStdString &
string);
286 void DrawString(
float x,
float y,
const char*
string);
295 void ComputeStringBounds(
const vtkStdString &
string,
float bounds[4]);
298 void ComputeStringBounds(
const char*
string,
vtkPoints2D *bounds);
299 void ComputeStringBounds(
const char*
string,
float bounds[4]);
308 int ComputeFontSizeForBoundedString(
const vtkStdString &
string,
float width,
320 void DrawMathTextString(
float x,
float y,
const vtkStdString &
string);
322 void DrawMathTextString(
float x,
float y,
const char *
string);
334 void DrawMathTextString(
float x,
float y,
const vtkStdString &
string,
337 const char *fallback);
338 void DrawMathTextString(
float x,
float y,
const char *
string,
339 const char *fallback);
344 bool MathTextIsSupported();
350 void ApplyPen(
vtkPen *pen);
402 static int FloatToInt(
float x);
423 vtkContext2D(const vtkContext2D &);
424 void operator=(const vtkContext2D &);
432 inline
int vtkContext2D::FloatToInt(
float x)
442 float tol = 0.00390625;
443 tol = (x >= 0 ? tol : -tol);
444 return static_cast<int>(x + tol);
447 #endif //vtkContext2D_h
Wrapper around std::string to keep symbols short.
abstract base class for most VTK objects
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)
#define VTKRENDERINGCONTEXT2D_EXPORT
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.
represent text properties.
dynamic, self-adjusting array of unsigned char
2D array of ids, used for picking.
String class that stores Unicode text.
Class for drawing 3D primitives to a graphical context.