VTK
|
Access to MatPlotLib MathText rendering. More...
#include <vtkMatplotlibMathTextUtilities.h>
Public Types | |
typedef vtkMathTextUtilities | Superclass |
Public Types inherited from vtkMathTextUtilities | |
typedef vtkObject | Superclass |
Public Types inherited from vtkObject | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkMatplotlibMathTextUtilities * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual bool | IsAvailable () |
bool | GetMetrics (vtkTextProperty *tprop, const char *str, int dpi, vtkTextRenderer::Metrics &metrics) |
bool | GetBoundingBox (vtkTextProperty *tprop, const char *str, int dpi, int bbox[4]) |
bool | RenderString (const char *str, vtkImageData *data, vtkTextProperty *tprop, int dpi, int textDims[2]=NULL) |
bool | StringToPath (const char *str, vtkPath *path, vtkTextProperty *tprop, int dpi) |
virtual void | SetScaleToPowerOfTwo (bool) |
virtual bool | GetScaleToPowerOfTwo () |
Public Member Functions inherited from vtkMathTextUtilities | |
vtkMathTextUtilities * | NewInstance () const |
virtual int | GetConstrainedFontSize (const char *str, vtkTextProperty *tprop, int targetWidth, int targetHeight, int dpi) |
Public Member Functions inherited from vtkObject | |
vtkObject * | NewInstance () const |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkMatplotlibMathTextUtilities * | SafeDownCast (vtkObjectBase *o) |
static vtkMatplotlibMathTextUtilities * | New () |
Static Public Member Functions inherited from vtkMathTextUtilities | |
static int | IsTypeOf (const char *type) |
static vtkMathTextUtilities * | SafeDownCast (vtkObjectBase *o) |
static vtkMathTextUtilities * | New () |
static vtkMathTextUtilities * | GetInstance () |
static void | SetInstance (vtkMathTextUtilities *instance) |
Static Public Member Functions inherited from vtkObject | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
Static Public Member Functions inherited from vtkObjectBase | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Static Protected Member Functions | |
static void | GetJustifiedBBox (int rows, int cols, vtkTextProperty *tprop, int bbox[4]) |
static void | RotateCorners (double angleDeg, double corners[4][2], double bbox[4]) |
Protected Attributes | |
vtkPythonInterpreter * | Interpreter |
PyObject * | MaskParser |
PyObject * | PathParser |
PyObject * | FontPropertiesClass |
bool | ScaleToPowerOfTwo |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
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.
Definition at line 47 of file vtkMatplotlibMathTextUtilities.h.
|
protected |
|
protectedvirtual |
|
static |
|
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 |
|
protectedvirtual |
Reimplemented from vtkMathTextUtilities.
vtkMatplotlibMathTextUtilities* vtkMatplotlibMathTextUtilities::NewInstance | ( | ) | const |
|
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 |
|
virtual |
Returns true if mathtext rendering is available.
Reimplemented from vtkMathTextUtilities.
|
virtual |
Given a text property and a string, get the bounding box {xmin, xmax, ymin, ymax} of the rendered string in pixels. The origin of the bounding box is the anchor point described by the horizontal and vertical justification text property variables. Returns true on success, false otherwise.
Implements vtkMathTextUtilities.
|
virtual |
Return the metrics for the rendered str, tprop, and dpi.
Implements vtkMathTextUtilities.
|
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. The origin of the image's extents is aligned with the anchor point described by the text property's vertical and horizontal justification options.
Implements vtkMathTextUtilities.
|
virtual |
Parse the MathText expression in str and fill path with a contour of the glyphs. The origin of the path coordinates is aligned with the anchor point described by the text property's horizontal and vertical justification options.
Implements vtkMathTextUtilities.
|
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 |
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.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Returns a matplotlib.font_manager.FontProperties PyObject, initialized from the vtkTextProperty tprop.
|
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.
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
Definition at line 118 of file vtkMatplotlibMathTextUtilities.h.
|
protected |
Definition at line 119 of file vtkMatplotlibMathTextUtilities.h.
|
protected |
Definition at line 120 of file vtkMatplotlibMathTextUtilities.h.
|
protected |
Definition at line 121 of file vtkMatplotlibMathTextUtilities.h.
|
protected |
Definition at line 131 of file vtkMatplotlibMathTextUtilities.h.