21 #ifndef vtkContext2D_h
22 #define vtkContext2D_h
25 #include "vtkRenderingContext2DModule.h"
29 VTK_ABI_NAMESPACE_BEGIN
79 bool GetBufferIdMode()
const;
95 void BufferIdModeEnd();
100 void DrawLine(
float x1,
float y1,
float x2,
float y2);
105 void DrawLine(
float p[4]);
116 void DrawPoly(
float* x,
float* y,
int n);
129 void DrawPoly(
float*
points,
int n);
137 void DrawPoly(
float*
points,
int n,
unsigned char* colors,
int nc_comps);
149 void DrawLines(
float*
points,
int n);
154 void DrawPoint(
float x,
float y);
159 void DrawPoints(
float* x,
float* y,
int n);
174 void DrawPoints(
float*
points,
int n);
191 void DrawPointSprites(
194 std::uintptr_t cacheIdentifier);
221 virtual void DrawMarkers(
222 int shape,
bool highlight,
float*
points,
int n,
unsigned char* colors,
int nc_comps);
223 virtual void DrawMarkers(
int shape,
bool highlight,
float*
points,
int n);
225 virtual void DrawMarkers(
232 virtual void DrawMarkers(
int shape,
bool highlight,
vtkDataArray* positions,
238 void DrawRect(
float x,
float y,
float w,
float h);
244 void DrawQuad(
float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4);
245 void DrawQuad(
float* p);
253 void DrawQuadStrip(
float* p,
int n);
260 void DrawPolygon(
float* x,
float* y,
int n);
273 void DrawPolygon(
float*
points,
int n);
279 void DrawPolygon(
float* x,
float* y,
int n,
unsigned char*
color,
int nc_comps);
292 void DrawPolygon(
float*
points,
int n,
unsigned char*
color,
int nc_comps);
299 void DrawEllipse(
float x,
float y,
float rx,
float ry);
310 float x,
float y,
float outRadius,
float inRadius,
float startAngle,
float stopAngle);
323 void DrawEllipseWedge(
float x,
float y,
float outRx,
float outRy,
float inRx,
float inRy,
331 void DrawArc(
float x,
float y,
float r,
float startAngle,
float stopAngle);
339 void DrawEllipticArc(
float x,
float y,
float rX,
float rY,
float startAngle,
float stopAngle);
373 void DrawStringRect(
vtkPoints2D* rect,
const char*
string);
374 void DrawStringRect(
const float rect[4],
const vtkStdString&
string);
375 void DrawStringRect(
const float rect[4],
const char*
string);
383 void DrawString(
float x,
float y,
const vtkStdString&
string);
385 void DrawString(
float x,
float y,
const char*
string);
399 void ComputeStringBounds(
const vtkStdString&
string,
float bounds[4]);
400 void ComputeStringBounds(
const char*
string,
vtkPoints2D* bounds);
401 void ComputeStringBounds(
const char*
string,
float bounds[4]);
408 void ComputeJustifiedStringBounds(
const char*
string,
float bounds[4]);
416 int ComputeFontSizeForBoundedString(
const vtkStdString&
string,
float width,
float height);
427 void DrawMathTextString(
float x,
float y,
const vtkStdString&
string);
429 void DrawMathTextString(
float x,
float y,
const char*
string);
441 void DrawMathTextString(
443 void DrawMathTextString(
445 void DrawMathTextString(
vtkPoints2D*
point,
const char*
string,
const char* fallback);
446 void DrawMathTextString(
float x,
float y,
const char*
string,
const char* fallback);
452 bool MathTextIsSupported();
459 void ApplyPen(
vtkPen* pen);
532 static int FloatToInt(
float x);
571 vtkVector2f CalculateTextPosition(
const float rect[4]);
584 float tol = 0.00390625;
585 tol = (x >= 0 ? tol : -tol);
586 return static_cast<int>(x + tol);
589 VTK_ABI_NAMESPACE_END
590 #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 superclass for arrays of numeric 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...
Class for drawing 3D primitives to a graphical context.