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);
277 void DrawPolygon(
float *x,
float *y,
int n,
278 unsigned char *
color,
int nc_comps);
285 unsigned char *
color,
int nc_comps);
292 void DrawPolygon(
float *
points,
int n,
293 unsigned char *
color,
int nc_comps);
300 void DrawEllipse(
float x,
float y,
float rx,
float ry);
310 void DrawWedge(
float x,
float y,
float outRadius,
325 void DrawEllipseWedge(
float x,
float y,
float outRx,
float outRy,
335 void DrawArc(
float x,
float y,
float r,
float startAngle,
344 void DrawEllipticArc(
float x,
float y,
float rX,
float rY,
float startAngle,
370 void DrawPolyData(
float x,
float y,
vtkPolyData* polyData,
381 void DrawStringRect(
vtkPoints2D *rect,
const char*
string);
389 void DrawString(
float x,
float y,
const vtkStdString &
string);
393 void DrawString(
float x,
float y,
const char*
string);
407 void ComputeStringBounds(
const vtkStdString &
string,
float bounds[4]);
410 void ComputeStringBounds(
const char*
string,
vtkPoints2D *bounds);
411 void ComputeStringBounds(
const char*
string,
float bounds[4]);
418 void ComputeJustifiedStringBounds(
const char*
string,
float bounds[4]);
426 int ComputeFontSizeForBoundedString(
const vtkStdString &
string,
float width,
438 void DrawMathTextString(
float x,
float y,
const vtkStdString &
string);
440 void DrawMathTextString(
float x,
float y,
const char *
string);
454 void DrawMathTextString(
float x,
float y,
const vtkStdString &
string,
457 const char *fallback);
458 void DrawMathTextString(
float x,
float y,
const char *
string,
459 const char *fallback);
466 bool MathTextIsSupported();
473 void ApplyPen(
vtkPen *pen);
546 static int FloatToInt(
float x);
559 ~vtkContext2D() override;
568 vtkContext2D(const vtkContext2D &) = delete;
569 void operator=(const vtkContext2D &) = delete;
589 inline
int vtkContext2D::FloatToInt(
float x)
599 float tol = 0.00390625;
600 tol = (x >= 0 ? tol : -tol);
601 return static_cast<int>(x + tol);
604 #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.