33 #ifndef vtkContext2D_h
34 #define vtkContext2D_h
37 #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,
unsigned char* colors,
int nc_comps);
157 void DrawLines(
float*
points,
int n);
162 void DrawPoint(
float x,
float y);
167 void DrawPoints(
float* x,
float* y,
int n);
180 void DrawPoints(
float*
points,
int n);
197 void DrawPointSprites(
225 virtual void DrawMarkers(
226 int shape,
bool highlight,
float*
points,
int n,
unsigned char* colors,
int nc_comps);
227 virtual void DrawMarkers(
int shape,
bool highlight,
float*
points,
int n);
229 virtual void DrawMarkers(
236 void DrawRect(
float x,
float y,
float w,
float h);
242 void DrawQuad(
float x1,
float y1,
float x2,
float y2,
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,
unsigned char*
color,
int nc_comps);
290 void DrawPolygon(
float*
points,
int n,
unsigned char*
color,
int nc_comps);
297 void DrawEllipse(
float x,
float y,
float rx,
float ry);
308 float x,
float y,
float outRadius,
float inRadius,
float startAngle,
float stopAngle);
321 void DrawEllipseWedge(
float x,
float y,
float outRx,
float outRy,
float inRx,
float inRy,
329 void DrawArc(
float x,
float y,
float r,
float startAngle,
float stopAngle);
337 void DrawEllipticArc(
float x,
float y,
float rX,
float rY,
float startAngle,
float stopAngle);
371 void DrawStringRect(
vtkPoints2D* rect,
const char*
string);
372 void DrawStringRect(
const float rect[4],
const vtkStdString&
string);
373 void DrawStringRect(
const float rect[4],
const char*
string);
381 void DrawString(
float x,
float y,
const vtkStdString&
string);
383 void DrawString(
float x,
float y,
const char*
string);
397 void ComputeStringBounds(
const vtkStdString&
string,
float bounds[4]);
398 void ComputeStringBounds(
const char*
string,
vtkPoints2D* bounds);
399 void ComputeStringBounds(
const char*
string,
float bounds[4]);
406 void ComputeJustifiedStringBounds(
const char*
string,
float bounds[4]);
414 int ComputeFontSizeForBoundedString(
const vtkStdString&
string,
float width,
float height);
425 void DrawMathTextString(
float x,
float y,
const vtkStdString&
string);
427 void DrawMathTextString(
float x,
float y,
const char*
string);
439 void DrawMathTextString(
441 void DrawMathTextString(
443 void DrawMathTextString(
vtkPoints2D*
point,
const char*
string,
const char* fallback);
444 void DrawMathTextString(
float x,
float y,
const char*
string,
const char* fallback);
450 bool MathTextIsSupported();
457 void ApplyPen(
vtkPen* pen);
530 static int FloatToInt(
float x);
569 vtkVector2f CalculateTextPosition(
const float rect[4]);
582 float tol = 0.00390625;
583 tol = (x >= 0 ? tol : -tol);
584 return static_cast<int>(x + tol);
587 #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...
Class for drawing 3D primitives to a graphical context.