33 #ifndef vtkContext2D_h 34 #define vtkContext2D_h 36 #include "vtkRenderingContext2DModule.h" 88 bool GetBufferIdMode()
const;
104 void BufferIdModeEnd();
109 void DrawLine(
float x1,
float y1,
float x2,
float y2);
114 void DrawLine(
float p[4]);
125 void DrawPoly(
float *x,
float *y,
int n);
138 void DrawPoly(
float *
points,
int n);
146 void DrawPoly(
float *
points,
int n,
147 unsigned char *colors,
int nc_comps);
159 void DrawLines(
float *
points,
int n);
164 void DrawPoint(
float x,
float y);
169 void DrawPoints(
float *x,
float *y,
int n);
182 void DrawPoints(
float *
points,
int n);
201 unsigned char *colors,
int nc_comps);
224 virtual void DrawMarkers(
int shape,
bool highlight,
float *
points,
int n,
225 unsigned char *colors,
int nc_comps);
226 virtual void DrawMarkers(
int shape,
bool highlight,
float *
points,
int n);
235 void DrawRect(
float x,
float y,
float w,
float h);
241 void DrawQuad(
float x1,
float y1,
float x2,
float y2,
242 float x3,
float y3,
float x4,
float y4);
243 void DrawQuad(
float *p);
251 void DrawQuadStrip(
float *p,
int n);
258 void DrawPolygon(
float *x,
float *y,
int n);
271 void DrawPolygon(
float *
points,
int n);
278 void DrawEllipse(
float x,
float y,
float rx,
float ry);
288 void DrawWedge(
float x,
float y,
float outRadius,
303 void DrawEllipseWedge(
float x,
float y,
float outRx,
float outRy,
313 void DrawArc(
float x,
float y,
float r,
float startAngle,
322 void DrawEllipticArc(
float x,
float y,
float rX,
float rY,
float startAngle,
348 void DrawPolyData(
float x,
float y,
vtkPolyData* polyData,
359 void DrawStringRect(
vtkPoints2D *rect,
const char*
string);
367 void DrawString(
float x,
float y,
const vtkStdString &
string);
371 void DrawString(
float x,
float y,
const char*
string);
385 void ComputeStringBounds(
const vtkStdString &
string,
float bounds[4]);
388 void ComputeStringBounds(
const char*
string,
vtkPoints2D *bounds);
389 void ComputeStringBounds(
const char*
string,
float bounds[4]);
396 void ComputeJustifiedStringBounds(
const char*
string,
float bounds[4]);
404 int ComputeFontSizeForBoundedString(
const vtkStdString &
string,
float width,
416 void DrawMathTextString(
float x,
float y,
const vtkStdString &
string);
418 void DrawMathTextString(
float x,
float y,
const char *
string);
432 void DrawMathTextString(
float x,
float y,
const vtkStdString &
string,
435 const char *fallback);
436 void DrawMathTextString(
float x,
float y,
const char *
string,
437 const char *fallback);
444 bool MathTextIsSupported();
451 void ApplyPen(
vtkPen *pen);
524 static int FloatToInt(
float x);
547 void operator=(const
vtkContext2D &) VTK_DELETE_FUNCTION;
577 float tol = 0.00390625;
578 tol = (x >= 0 ? tol : -tol);
579 return static_cast<int>(x + tol);
582 #endif //vtkContext2D_h Wrapper around std::string to keep symbols short.
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
concrete dataset represents vertices, lines, polygons, and triangle strips
window superclass for vtkRenderWindow
Class for drawing 2D primitives to a graphical context.
provides a brush that fills shapes drawn by vtkContext2D.
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.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
String class that stores Unicode text.
Class for drawing 3D primitives to a graphical context.