27 #ifndef vtkContext2D_h 28 #define vtkContext2D_h 31 #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,
unsigned char* colors,
int nc_comps);
152 void DrawLines(
float*
points,
int n);
157 void DrawPoint(
float x,
float y);
162 void DrawPoints(
float* x,
float* y,
int n);
175 void DrawPoints(
float*
points,
int n);
192 void DrawPointSprites(
216 virtual void DrawMarkers(
217 int shape,
bool highlight,
float*
points,
int n,
unsigned char* colors,
int nc_comps);
218 virtual void DrawMarkers(
int shape,
bool highlight,
float*
points,
int n);
220 virtual void DrawMarkers(
227 void DrawRect(
float x,
float y,
float w,
float h);
233 void DrawQuad(
float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4);
234 void DrawQuad(
float* p);
242 void DrawQuadStrip(
float* p,
int n);
249 void DrawPolygon(
float* x,
float* y,
int n);
262 void DrawPolygon(
float*
points,
int n);
268 void DrawPolygon(
float* x,
float* y,
int n,
unsigned char*
color,
int nc_comps);
281 void DrawPolygon(
float*
points,
int n,
unsigned char*
color,
int nc_comps);
288 void DrawEllipse(
float x,
float y,
float rx,
float ry);
299 float x,
float y,
float outRadius,
float inRadius,
float startAngle,
float stopAngle);
312 void DrawEllipseWedge(
float x,
float y,
float outRx,
float outRy,
float inRx,
float inRy,
320 void DrawArc(
float x,
float y,
float r,
float startAngle,
float stopAngle);
328 void DrawEllipticArc(
float x,
float y,
float rX,
float rY,
float startAngle,
float stopAngle);
363 void DrawStringRect(
vtkPoints2D* rect,
const char*
string);
371 void DrawString(
float x,
float y,
const vtkStdString&
string);
375 void DrawString(
float x,
float y,
const char*
string);
389 void ComputeStringBounds(
const vtkStdString&
string,
float bounds[4]);
392 void ComputeStringBounds(
const char*
string,
vtkPoints2D* bounds);
393 void ComputeStringBounds(
const char*
string,
float bounds[4]);
400 void ComputeJustifiedStringBounds(
const char*
string,
float bounds[4]);
408 int ComputeFontSizeForBoundedString(
const vtkStdString&
string,
float width,
float height);
419 void DrawMathTextString(
float x,
float y,
const vtkStdString&
string);
421 void DrawMathTextString(
float x,
float y,
const char*
string);
433 void DrawMathTextString(
435 void DrawMathTextString(
437 void DrawMathTextString(
vtkPoints2D*
point,
const char*
string,
const char* fallback);
438 void DrawMathTextString(
float x,
float y,
const char*
string,
const char* fallback);
444 bool MathTextIsSupported();
451 void ApplyPen(
vtkPen* pen);
524 static int FloatToInt(
float x);
576 float tol = 0.00390625;
577 tol = (x >= 0 ? tol : -tol);
578 return static_cast<int>(x + tol);
581 #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.