 |
VTK
9.1.0
|
Go to the documentation of this file.
46 #ifndef vtkContext2D_h
47 #define vtkContext2D_h
51 #include "vtkRenderingContext2DModule.h"
123 void DrawLine(
float x1,
float y1,
float x2,
float y2);
241 int shape,
bool highlight,
float*
points,
int n,
unsigned char* colors,
int nc_comps);
257 void DrawQuad(
float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4);
323 float x,
float y,
float outRadius,
float inRadius,
float startAngle,
float stopAngle);
391 "Use
void DrawStringRect(const
float rect[4], const
vtkStdString&
string)")
393 void DrawStringRect(const
float rect[4], const
char*
string);
407 void DrawString(
float x,
float y, const
char*
string);
426 "Use
void ComputeStringBounds(const
vtkStdString&
string,
float bounds[4])")
428 void ComputeStringBounds(const
char*
string,
vtkPoints2D* bounds);
429 void ComputeStringBounds(const
char*
string,
float bounds[4]);
436 void ComputeJustifiedStringBounds(const
char*
string,
float bounds[4]);
457 void DrawMathTextString(
float x,
float y, const
char*
string);
469 void DrawMathTextString(
471 void DrawMathTextString(
474 void DrawMathTextString(
float x,
float y, const
char*
string, const
char* fallback);
480 bool MathTextIsSupported();
560 static
int FloatToInt(
float x);
599 vtkVector2f CalculateTextPosition(const
float rect[4]);
612 float tol = 0.00390625;
613 tol = (x >= 0 ? tol : -tol);
614 return static_cast<int>(x + tol);
617 #endif // vtkContext2D_h
provides a brush that fills shapes drawn by vtkContext2D.
represent and manipulate 2D points
void DrawPolyData(float x, float y, vtkPolyData *polyData, vtkUnsignedCharArray *colors, int scalarMode)
Draw the supplied polyData at the given x, y position (bottom corner).
void DrawWedge(float x, float y, float outRadius, float inRadius, float startAngle, float stopAngle)
Draw a circular wedge with center at x, y, outer radius outRadius, inner radius inRadius between angl...
void DrawArc(float x, float y, float r, float startAngle, float stopAngle)
Draw a circular arc with center at x,y with radius r between angles startAngle and stopAngle (express...
void DrawPolygon(vtkPoints2D *points)
Draw a polygon defined by the specified points - fastest code path due to memory layout of the coordi...
void DrawPolygon(vtkPoints2D *points, unsigned char *color, int nc_comps)
Draw a polygon defined by the specified points - fastest code path due to memory layout of the coordi...
void DrawPoints(float *points, int n)
Draw a poly line between the specified points, where the float array is of size 2*n and the points ar...
void DrawQuad(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
Draw a quadrilateral at the specified points (4 points, 8 floats in x, y).
void DrawLine(float x1, float y1, float x2, float y2)
Draw a line between the specified points.
void DrawStringRect(vtkPoints2D *rect, const vtkStdString &string)
Draw some text to the screen in a bounding rectangle with the alignment of the text properties respec...
void DrawPolygon(float *points, int n)
Draw a polygon defined by the specified points, where the float array is of size 2*n and the points a...
static vtkContext2D * New()
Creates a 2D Painter object.
void DrawLines(vtkPoints2D *points)
Draw multiple lines between the specified pairs of points.
void DrawPoly(float *points, int n, unsigned char *colors, int nc_comps)
Draw a poly line between the specified points, where the float array is of size 2*n and the points ar...
virtual void DrawMarkers(int shape, bool highlight, vtkPoints2D *points)
Draw a series of markers centered at the points supplied.
dynamic, self-adjusting array of unsigned char
void DrawEllipticArc(float x, float y, float rX, float rY, float startAngle, float stopAngle)
Draw an elliptic arc with center at x,y with radii rX and rY between angles startAngle and stopAngle ...
abstract base class for most VTK objects
#define VTK_DEPRECATED_IN_9_1_0(reason)
void DrawPoint(float x, float y)
Draw a point at the supplied x and y coordinate.
Class for drawing 2D primitives to a graphical context.
void DrawLine(float p[4])
Draw a line between the specified points.
void DrawPoints(vtkPoints2D *points)
Draw a poly line between the specified points - fastest code path due to memory layout of the coordin...
window superclass for vtkRenderWindow
bool Begin(vtkContextDevice2D *device)
Begin painting on a vtkContextDevice2D, no painting can occur before this call has been made.
void DrawRect(float x, float y, float w, float h)
Draw a rectangle with origin at x, y and width w, height h.
2D array of ids, used for picking.
void DrawLine(vtkPoints2D *points)
Draw a line between the specified points.
void DrawQuadStrip(vtkPoints2D *points)
Draw a strip of quads.
void DrawLines(float *points, int n)
Draw multiple lines between the specified pairs of points.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void DrawPolygon(float *x, float *y, int n)
Draw a polygon specified specified by the points using the x and y arrays supplied.
void DrawPoints(float *x, float *y, int n)
Draw the specified number of points using the x and y arrays supplied.
void DrawPoly(vtkPoints2D *points)
Draw a poly line between the specified points - fastest code path due to memory layout of the coordin...
void DrawEllipseWedge(float x, float y, float outRx, float outRy, float inRx, float inRy, float startAngle, float stopAngle)
Draw an elliptic wedge with center at x, y, outer radii outRx, outRy, inner radii inRx,...
void DrawPoly(float *points, int n)
Draw a poly line between the specified points, where the float array is of size 2*n and the points ar...
virtual void DrawMarkers(int shape, bool highlight, float *points, int n, unsigned char *colors, int nc_comps)
Draw a series of markers centered at the points supplied.
topologically and geometrically regular array of data
a simple class to control print indentation
String class that stores Unicode text.
void DrawPolygon(float *points, int n, unsigned char *color, int nc_comps)
Draw a polygon defined by the specified points, where the float array is of size 2*n and the points a...
virtual void DrawMarkers(int shape, bool highlight, float *points, int n)
Draw a series of markers centered at the points supplied.
virtual void DrawMarkers(int shape, bool highlight, vtkPoints2D *points, vtkUnsignedCharArray *colors)
Draw a series of markers centered at the points supplied.
void DrawImage(float x, float y, vtkImageData *image)
Draw the supplied image at the given x, y location (bottom corner).
void BufferIdModeEnd()
Finalize BufferId creation Mode.
Abstract class for drawing 2D primitives.
represent text properties.
void DrawEllipse(float x, float y, float rx, float ry)
Draw an ellipse with center at x, y and radii rx, ry.
void DrawPointSprites(vtkImageData *sprite, vtkPoints2D *points)
Draw a series of point sprites, images centred at the points supplied.
concrete dataset represents vertices, lines, polygons, and triangle strips
Class for drawing 3D primitives to a graphical context.
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Wrapper around std::string to keep symbols short.
void DrawQuad(float *p)
Draw a quadrilateral at the specified points (4 points, 8 floats in x, y).
void DrawPointSprites(vtkImageData *sprite, vtkPoints2D *points, vtkUnsignedCharArray *colors)
Draw a series of point sprites, images centred at the points supplied.
void DrawQuadStrip(float *p, int n)
Draw a strip of quads.
void DrawPolygon(float *x, float *y, int n, unsigned char *color, int nc_comps)
Draw a polygon specified specified by the points using the x and y arrays supplied.
void DrawPoly(float *x, float *y, int n)
Draw a poly line between the specified points.
void DrawImage(float x, float y, float scale, vtkImageData *image)
Draw the supplied image at the given x, y location (bottom corner).
bool GetBufferIdMode() const
Tell if the context is in BufferId creation mode.
void DrawPointSprites(vtkImageData *sprite, float *points, int n, unsigned char *colors, int nc_comps)
Draw a series of point sprites, images centred at the points supplied.
void DrawImage(const vtkRectf &pos, vtkImageData *image)
Draw the supplied image at the given position.
vtkFrustumSelector is a vtkSelector that selects elements based on whether they are inside or interse...
void DrawPointSprites(vtkImageData *sprite, float *points, int n)
Draw a series of point sprites, images centred at the points supplied.
bool End()
Ends painting on the device, you would not usually need to call this as it should be called by the de...
void BufferIdModeBegin(vtkAbstractContextBufferId *bufferId)
Start BufferId creation Mode.