Go to the documentation of this file.
32 #ifndef vtkContext2D_h
33 #define vtkContext2D_h
92 void DrawLine(
float x1,
float y1,
float x2,
float y2);
120 unsigned char *colors,
int nc_comps);
160 unsigned char *colors,
int nc_comps);
176 unsigned char *colors,
int nc_comps);
189 void DrawQuad(
float x1,
float y1,
float x2,
float y2,
190 float x3,
float y3,
float x4,
float y4);
337 const char *fallback);
339 const char *fallback);
402 static int FloatToInt(
float x);
442 float tol = 0.00390625;
443 tol = (
x >= 0 ? tol : -tol);
444 return static_cast<int>(
x + tol);
447 #endif //vtkContext2D_h
provides a brush that fills shapes drawn by vtkContext2D.
represent and manipulate 2D points
void DrawWedge(float x, float y, float outRadius, float inRadius, float startAngle, float stopAngle)
void DrawArc(float x, float y, float r, float startAngle, float stopAngle)
void DrawPolygon(vtkPoints2D *points)
void DrawPoints(float *points, int n)
void DrawQuad(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
#define vtkGetObjectMacro(name, type)
void DrawMathTextString(vtkPoints2D *point, const vtkStdString &string, const vtkStdString &fallback)
void DrawLine(float x1, float y1, float x2, float y2)
void ComputeStringBounds(const vtkStdString &string, vtkPoints2D *bounds)
GLfloat GLfloat GLfloat GLfloat h
void DrawStringRect(vtkPoints2D *rect, const vtkStdString &string)
void DrawPolygon(float *points, int n)
void ApplyPen(vtkPen *pen)
void DrawString(vtkPoints2D *point, const char *string)
#define VTKRENDERINGCONTEXT2D_EXPORT
static vtkContext2D * New()
void DrawLines(vtkPoints2D *points)
void DrawPoly(float *points, int n, unsigned char *colors, int nc_comps)
void DrawString(vtkPoints2D *point, const vtkUnicodeString &string)
virtual void DrawMarkers(int shape, bool highlight, vtkPoints2D *points)
GLenum GLenum GLenum GLenum GLenum scale
dynamic, self-adjusting array of unsigned char
void DrawMathTextString(float x, float y, const vtkStdString &string, const vtkStdString &fallback)
#define vtkTypeMacro(thisClass, superclass)
void DrawEllipticArc(float x, float y, float rX, float rY, float startAngle, float stopAngle)
abstract base class for most VTK objects
int ComputeFontSizeForBoundedString(const vtkStdString &string, float width, float height)
GLint GLint GLint GLint GLint x
void ApplyId(vtkIdType id)
void DrawMathTextString(float x, float y, const char *string)
void DrawPoint(float x, float y)
Class for drawing 2D primitives to a graphical context.
void ComputeStringBounds(const vtkUnicodeString &string, vtkPoints2D *bounds)
void ApplyBrush(vtkBrush *brush)
GLsizei const GLfloat * points
bool MathTextIsSupported()
void DrawLine(float p[4])
void SetTransform(vtkTransform2D *transform)
void ComputeStringBounds(const char *string, float bounds[4])
void DrawPoints(vtkPoints2D *points)
void DrawStringRect(vtkPoints2D *rect, const char *string)
vtkTransform2D * GetTransform()
window superclass for vtkRenderWindow
bool Begin(vtkContextDevice2D *device)
void DrawMathTextString(float x, float y, const char *string, const char *fallback)
void DrawRect(float x, float y, float w, float h)
2D array of ids, used for picking.
void DrawString(float x, float y, const vtkStdString &string)
void ComputeStringBounds(const vtkStdString &string, float bounds[4])
void DrawLine(vtkPoints2D *points)
void DrawQuadStrip(vtkPoints2D *points)
void DrawLines(float *points, int n)
virtual void PrintSelf(ostream &os, vtkIndent indent)
void DrawPolygon(float *x, float *y, int n)
void DrawPoints(float *x, float *y, int n)
void DrawPoly(vtkPoints2D *points)
void DrawEllipseWedge(float x, float y, float outRx, float outRy, float inRx, float inRy, float startAngle, float stopAngle)
void DrawMathTextString(vtkPoints2D *point, const char *string, const char *fallback)
vtkTextProperty * GetTextProp()
void DrawPoly(float *points, int n)
void DrawString(float x, float y, const vtkUnicodeString &string)
virtual void DrawMarkers(int shape, bool highlight, float *points, int n, unsigned char *colors, int nc_comps)
topologically and geometrically regular array of data
a simple class to control print indentation
String class that stores Unicode text.
void DrawString(vtkPoints2D *point, const vtkStdString &string)
void AppendTransform(vtkTransform2D *transform)
virtual void DrawMarkers(int shape, bool highlight, float *points, int n)
virtual void DrawMarkers(int shape, bool highlight, vtkPoints2D *points, vtkUnsignedCharArray *colors)
void DrawImage(float x, float y, vtkImageData *image)
void DrawMathTextString(float x, float y, const vtkStdString &string)
Abstract class for drawing 2D primitives.
represent text properties.
GLint GLint GLsizei width
void DrawEllipse(float x, float y, float rx, float ry)
GLdouble GLdouble GLdouble r
GLint GLint GLint GLint GLint GLint y
void DrawMathTextString(vtkPoints2D *point, const char *string)
void ComputeStringBounds(const char *string, vtkPoints2D *bounds)
void DrawPointSprites(vtkImageData *sprite, vtkPoints2D *points)
void DrawStringRect(vtkPoints2D *rect, const vtkUnicodeString &string)
void DrawString(float x, float y, const char *string)
Class for drawing 3D primitives to a graphical context.
void DrawMathTextString(vtkPoints2D *point, const vtkStdString &string)
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
GLubyte GLubyte GLubyte GLubyte w
Wrapper around std::string to keep symbols short.
void ApplyTextProp(vtkTextProperty *prop)
GLuint GLenum GLenum transform
void ComputeStringBounds(const vtkUnicodeString &string, float bounds[4])
void DrawPointSprites(vtkImageData *sprite, vtkPoints2D *points, vtkUnsignedCharArray *colors)
void DrawQuadStrip(float *p, int n)
void DrawPoly(float *x, float *y, int n)
void DrawImage(float x, float y, float scale, vtkImageData *image)
bool GetBufferIdMode() const
void DrawPointSprites(vtkImageData *sprite, float *points, int n, unsigned char *colors, int nc_comps)
void DrawImage(const vtkRectf &pos, vtkImageData *image)
GLenum GLsizei GLenum GLenum const GLvoid * image
void DrawPointSprites(vtkImageData *sprite, float *points, int n)
GLint GLint GLsizei GLsizei height
void BufferIdModeBegin(vtkAbstractContextBufferId *bufferId)