33 #ifndef vtkContext2D_h
34 #define vtkContext2D_h
36 #include "vtkRenderingContext2DModule.h"
87 bool GetBufferIdMode()
const;
103 void BufferIdModeEnd();
108 void DrawLine(
float x1,
float y1,
float x2,
float y2);
113 void DrawLine(
float p[4]);
124 void DrawPoly(
float *x,
float *y,
int n);
137 void DrawPoly(
float *
points,
int n);
145 void DrawPoly(
float *
points,
int n,
146 unsigned char *colors,
int nc_comps);
158 void DrawLines(
float *
points,
int n);
163 void DrawPoint(
float x,
float y);
168 void DrawPoints(
float *x,
float *y,
int n);
181 void DrawPoints(
float *
points,
int n);
200 unsigned char *colors,
int nc_comps);
223 virtual void DrawMarkers(
int shape,
bool highlight,
float *
points,
int n,
224 unsigned char *colors,
int nc_comps);
225 virtual void DrawMarkers(
int shape,
bool highlight,
float *
points,
int n);
234 void DrawRect(
float x,
float y,
float w,
float h);
240 void DrawQuad(
float x1,
float y1,
float x2,
float y2,
241 float x3,
float y3,
float x4,
float y4);
242 void DrawQuad(
float *p);
250 void DrawQuadStrip(
float *p,
int n);
257 void DrawPolygon(
float *x,
float *y,
int n);
270 void DrawPolygon(
float *
points,
int n);
277 void DrawEllipse(
float x,
float y,
float rx,
float ry);
287 void DrawWedge(
float x,
float y,
float outRadius,
302 void DrawEllipseWedge(
float x,
float y,
float outRx,
float outRy,
312 void DrawArc(
float x,
float y,
float r,
float startAngle,
321 void DrawEllipticArc(
float x,
float y,
float rX,
float rY,
float startAngle,
351 void DrawStringRect(
vtkPoints2D *rect,
const char*
string);
359 void DrawString(
float x,
float y,
const vtkStdString &
string);
363 void DrawString(
float x,
float y,
const char*
string);
377 void ComputeStringBounds(
const vtkStdString &
string,
float bounds[4]);
380 void ComputeStringBounds(
const char*
string,
vtkPoints2D *bounds);
381 void ComputeStringBounds(
const char*
string,
float bounds[4]);
389 void ComputeJustifiedStringBounds(
const char*
string,
float bounds[4]);
397 int ComputeFontSizeForBoundedString(
const vtkStdString &
string,
float width,
409 void DrawMathTextString(
float x,
float y,
const vtkStdString &
string);
411 void DrawMathTextString(
float x,
float y,
const char *
string);
425 void DrawMathTextString(
float x,
float y,
const vtkStdString &
string,
428 const char *fallback);
429 void DrawMathTextString(
float x,
float y,
const char *
string,
430 const char *fallback);
437 bool MathTextIsSupported();
444 void ApplyPen(
vtkPen *pen);
517 static int FloatToInt(
float x);
539 vtkContext2D(const vtkContext2D &) VTK_DELETE_FUNCTION;
540 void operator=(const vtkContext2D &) VTK_DELETE_FUNCTION;
560 inline
int vtkContext2D::FloatToInt(
float x)
570 float tol = 0.00390625;
571 tol = (x >= 0 ? tol : -tol);
572 return static_cast<int>(x + tol);
575 #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.
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.