Go to the documentation of this file.
28 #ifndef vtkMatplotlibMathTextUtilities_h
29 #define vtkMatplotlibMathTextUtilities_h
31 #include "vtkRenderingMatplotlibModule.h"
38 class vtkPythonInterpreter;
60 int bbox[4])
override;
76 int dpi,
int textDims[2] = NULL)
override;
158 static Availability CheckMPLAvailability();
164 static Availability MPLMathTextAvailable;
static vtkMatplotlibMathTextUtilities * New()
PyObject * GetFontProperties(vtkTextProperty *tprop)
Returns a matplotlib.font_manager.FontProperties PyObject, initialized from the vtkTextProperty tprop...
bool StringToPath(const char *str, vtkPath *path, vtkTextProperty *tprop, int dpi) override
Parse the MathText expression in str and fill path with a contour of the glyphs.
Access to MatPlotLib MathText rendering.
bool InitializeMaskParser()
~vtkMatplotlibMathTextUtilities() override
concrete dataset representing a path defined by Bezier curves.
void SetScaleToPowerOfTwo(bool val) override
Set to true if the graphics implementation requires texture image dimensions to be a power of two.
Abstract interface to equation rendering.
bool GetBoundingBox(vtkTextProperty *tprop, const char *str, int dpi, int bbox[4]) override
Given a text property and a string, get the bounding box {xmin, xmax, ymin, ymax} of the rendered str...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool GetScaleToPowerOfTwo() override
Set to true if the graphics implementation requires texture image dimensions to be a power of two.
bool GetMetrics(vtkTextProperty *tprop, const char *str, int dpi, vtkTextRenderer::Metrics &metrics) override
Return the metrics for the rendered str, tprop, and dpi.
topologically and geometrically regular array of data
a simple class to control print indentation
bool CheckForError(PyObject *object)
PyObject * FontPropertiesClass
static void RotateCorners(double angleDeg, double corners[4][2], double bbox[4])
represent text properties.
bool InitializePathParser()
vtkMatplotlibMathTextUtilities()
bool InitializeFontPropertiesClass()
void CleanupPythonObjects()
Cleanup and destroy any python objects.
bool RenderString(const char *str, vtkImageData *data, vtkTextProperty *tprop, int dpi, int textDims[2]=NULL) override
Render the given string str into the vtkImageData data with a resolution of dpi.
bool PrepareImageData(vtkImageData *data, int bbox[4])
vtkPythonInterpreter * Interpreter
static void GetJustifiedBBox(int rows, int cols, vtkTextProperty *tprop, int bbox[4])
bool IsAvailable() override
Returns true if mathtext rendering is available.