VTK
|
Access to MatPlotLib MathText rendering. More...
#include <vtkMatplotlibMathTextUtilities.h>
Access to MatPlotLib MathText rendering.
vtkMatplotlibMathTextUtilities provides access to the MatPlotLib MathText implementation.
This class is aware of a number of environment variables that can be used to configure and debug python initialization (all are optional):
VTK_MATPLOTLIB_DEBUG: Enable verbose debugging output during initialization of the python environment.
Definition at line 43 of file vtkMatplotlibMathTextUtilities.h.
Reimplemented from vtkMathTextUtilities.
Definition at line 47 of file vtkMatplotlibMathTextUtilities.h.
enum vtkMatplotlibMathTextUtilities::Availablity [protected] |
Used for runtime checking of matplotlib's mathtext availability.
Definition at line 113 of file vtkMatplotlibMathTextUtilities.h.
vtkMatplotlibMathTextUtilities::vtkMatplotlibMathTextUtilities | ( | ) | [protected] |
virtual vtkMatplotlibMathTextUtilities::~vtkMatplotlibMathTextUtilities | ( | ) | [protected, virtual] |
static int vtkMatplotlibMathTextUtilities::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkMathTextUtilities.
virtual int vtkMatplotlibMathTextUtilities::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkMathTextUtilities.
static vtkMatplotlibMathTextUtilities* vtkMatplotlibMathTextUtilities::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkMathTextUtilities.
virtual vtkObjectBase* vtkMatplotlibMathTextUtilities::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkMathTextUtilities.
Reimplemented from vtkMathTextUtilities.
void vtkMatplotlibMathTextUtilities::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkMathTextUtilities.
static vtkMatplotlibMathTextUtilities* vtkMatplotlibMathTextUtilities::New | ( | ) | [static] |
This is a singleton pattern New. There will be only ONE reference to a vtkMathTextUtilities object per process. Clients that call this method must use Delete() on the object so that reference counting will work. The single instance will be unreferenced when the program exits. You should just use the static GetInstance() method anyway to get the singleton.
Reimplemented from vtkMathTextUtilities.
bool vtkMatplotlibMathTextUtilities::GetBoundingBox | ( | vtkTextProperty * | tprop, |
const char * | str, | ||
unsigned int | dpi, | ||
int | bbox[4] | ||
) | [virtual] |
Determine the dimensions of the image that RenderString will produce for a given str, tprop, and dpi
Implements vtkMathTextUtilities.
bool vtkMatplotlibMathTextUtilities::RenderString | ( | const char * | str, |
vtkImageData * | data, | ||
vtkTextProperty * | tprop, | ||
unsigned int | dpi, | ||
int | textDims[2] = NULL |
||
) | [virtual] |
Render the given string str into the vtkImageData data with a resolution of dpi. The image is resized automatically. textDims will be overwritten by the pixel width and height of the rendered string. This is useful when ScaleToPowerOfTwo is true, and the image dimensions may not match the dimensions of the rendered text.
Implements vtkMathTextUtilities.
bool vtkMatplotlibMathTextUtilities::StringToPath | ( | const char * | str, |
vtkPath * | path, | ||
vtkTextProperty * | tprop | ||
) | [virtual] |
Parse the MathText expression in str and fill path with a contour of the glyphs.
Implements vtkMathTextUtilities.
virtual void vtkMatplotlibMathTextUtilities::SetScaleToPowerOfTwo | ( | bool | ) | [virtual] |
Set to true if the graphics implmentation requires texture image dimensions to be a power of two. Default is true, but this member will be set appropriately when GL is inited.
Implements vtkMathTextUtilities.
virtual bool vtkMatplotlibMathTextUtilities::GetScaleToPowerOfTwo | ( | ) | [virtual] |
Set to true if the graphics implmentation requires texture image dimensions to be a power of two. Default is true, but this member will be set appropriately when GL is inited.
Implements vtkMathTextUtilities.
bool vtkMatplotlibMathTextUtilities::InitializeMaskParser | ( | ) | [protected] |
bool vtkMatplotlibMathTextUtilities::InitializePathParser | ( | ) | [protected] |
bool vtkMatplotlibMathTextUtilities::InitializeFontPropertiesClass | ( | ) | [protected] |
bool vtkMatplotlibMathTextUtilities::CheckForError | ( | ) | [protected] |
bool vtkMatplotlibMathTextUtilities::CheckForError | ( | PyObject * | object | ) | [protected] |
PyObject* vtkMatplotlibMathTextUtilities::GetFontProperties | ( | vtkTextProperty * | tprop | ) | [protected] |
Returns a matplotlib.font_manager.FontProperties PyObject, initialized from the vtkTextProperty tprop.
void vtkMatplotlibMathTextUtilities::CleanupPythonObjects | ( | ) | [protected] |
Cleanup and destroy any python objects. This is called during destructor as well as when the Python interpreter is finalized. Thus this class must handle the case where the internal python objects disappear between calls.
void vtkMatplotlibMathTextUtilities::RotateCorners | ( | double | angleDeg, |
double | corners[4][2], | ||
double | bbox[4] | ||
) | [protected] |
bool vtkMatplotlibMathTextUtilities::PrepareImageData | ( | vtkImageData * | data, |
int | bbox[4] | ||
) | [protected] |
static void vtkMatplotlibMathTextUtilities::CheckMPLAvailability | ( | ) | [static, protected] |
vtkPythonInterpreter* vtkMatplotlibMathTextUtilities::Interpreter [protected] |
Definition at line 102 of file vtkMatplotlibMathTextUtilities.h.
PyObject* vtkMatplotlibMathTextUtilities::MaskParser [protected] |
Definition at line 103 of file vtkMatplotlibMathTextUtilities.h.
PyObject* vtkMatplotlibMathTextUtilities::PathParser [protected] |
Definition at line 104 of file vtkMatplotlibMathTextUtilities.h.
Definition at line 105 of file vtkMatplotlibMathTextUtilities.h.
bool vtkMatplotlibMathTextUtilities::ScaleToPowerOfTwo [protected] |
Definition at line 121 of file vtkMatplotlibMathTextUtilities.h.