27 #ifndef vtkContext2D_h 28 #define vtkContext2D_h 30 #include "vtkRenderingContext2DModule.h" 82 bool GetBufferIdMode()
const;
98 void BufferIdModeEnd();
103 void DrawLine(
float x1,
float y1,
float x2,
float y2);
108 void DrawLine(
float p[4]);
119 void DrawPoly(
float *x,
float *y,
int n);
132 void DrawPoly(
float *
points,
int n);
140 void DrawPoly(
float *
points,
int n,
141 unsigned char *colors,
int nc_comps);
153 void DrawLines(
float *
points,
int n);
158 void DrawPoint(
float x,
float y);
163 void DrawPoints(
float *x,
float *y,
int n);
176 void DrawPoints(
float *
points,
int n);
195 unsigned char *colors,
int nc_comps);
218 virtual void DrawMarkers(
int shape,
bool highlight,
float *
points,
int n,
219 unsigned char *colors,
int nc_comps);
220 virtual void DrawMarkers(
int shape,
bool highlight,
float *
points,
int n);
229 void DrawRect(
float x,
float y,
float w,
float h);
235 void DrawQuad(
float x1,
float y1,
float x2,
float y2,
236 float x3,
float y3,
float x4,
float y4);
237 void DrawQuad(
float *p);
245 void DrawQuadStrip(
float *p,
int n);
252 void DrawPolygon(
float *x,
float *y,
int n);
265 void DrawPolygon(
float *
points,
int n);
271 void DrawPolygon(
float *x,
float *y,
int n,
272 unsigned char *
color,
int nc_comps);
279 unsigned char *
color,
int nc_comps);
286 void DrawPolygon(
float *
points,
int n,
287 unsigned char *
color,
int nc_comps);
294 void DrawEllipse(
float x,
float y,
float rx,
float ry);
304 void DrawWedge(
float x,
float y,
float outRadius,
319 void DrawEllipseWedge(
float x,
float y,
float outRx,
float outRy,
329 void DrawArc(
float x,
float y,
float r,
float startAngle,
338 void DrawEllipticArc(
float x,
float y,
float rX,
float rY,
float startAngle,
364 void DrawPolyData(
float x,
float y,
vtkPolyData* polyData,
375 void DrawStringRect(
vtkPoints2D *rect,
const char*
string);
383 void DrawString(
float x,
float y,
const vtkStdString &
string);
387 void DrawString(
float x,
float y,
const char*
string);
401 void ComputeStringBounds(
const vtkStdString &
string,
float bounds[4]);
404 void ComputeStringBounds(
const char*
string,
vtkPoints2D *bounds);
405 void ComputeStringBounds(
const char*
string,
float bounds[4]);
412 void ComputeJustifiedStringBounds(
const char*
string,
float bounds[4]);
420 int ComputeFontSizeForBoundedString(
const vtkStdString &
string,
float width,
432 void DrawMathTextString(
float x,
float y,
const vtkStdString &
string);
434 void DrawMathTextString(
float x,
float y,
const char *
string);
448 void DrawMathTextString(
float x,
float y,
const vtkStdString &
string,
451 const char *fallback);
452 void DrawMathTextString(
float x,
float y,
const char *
string,
453 const char *fallback);
460 bool MathTextIsSupported();
467 void ApplyPen(
vtkPen *pen);
540 static int FloatToInt(
float x);
593 float tol = 0.00390625;
594 tol = (x >= 0 ? tol : -tol);
595 return static_cast<int>(x + tol);
598 #endif //vtkContext2D_h
Wrapper around std::string to keep symbols short.
vtkAbstractContextBufferId * BufferId
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
static int FloatToInt(float x)
Float to int conversion, performs truncation but with a rounding tolerance for float values that are ...
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.
vtkContextDevice2D * Device
dynamic, self-adjusting array of unsigned char
2D array of ids, used for picking.
vtkTransform2D * Transform
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.