Go to the documentation of this file.
27 #ifndef vtkMathTextUtilities_h
28 #define vtkMathTextUtilities_h
30 #include "vtkRenderingFreeTypeModule.h"
108 int textDims[2] = NULL) = 0;
125 int targetWidth,
int targetHeight,
virtual bool IsAvailable()
Returns true if mathtext rendering is available.
virtual bool GetMetrics(vtkTextProperty *tprop, const char *str, int dpi, vtkTextRenderer::Metrics &metrics)=0
Return the metrics for the rendered str, tprop, and dpi.
concrete dataset representing a path defined by Bezier curves.
abstract base class for most VTK objects
static void SetInstance(vtkMathTextUtilities *instance)
Supply a user defined instance.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static vtkMathTextUtilities * GetInstance()
Return the singleton instance with no reference counting.
virtual bool RenderString(const char *str, vtkImageData *data, vtkTextProperty *tprop, int dpi, int textDims[2]=NULL)=0
Render the given string str into the vtkImageData data with a resolution of dpi.
Abstract interface to equation rendering.
~vtkMathTextUtilitiesCleanup()
virtual bool GetScaleToPowerOfTwo()=0
Set to true if the graphics implmentation requires texture image dimensions to be a power of two.
virtual bool StringToPath(const char *str, vtkPath *path, vtkTextProperty *tprop, int dpi)=0
Parse the MathText expression in str and fill path with a contour of the glyphs.
virtual int GetConstrainedFontSize(const char *str, vtkTextProperty *tprop, int targetWidth, int targetHeight, int dpi)
This function returns the font size (in points) required to fit the string in the target rectangle.
vtkMathTextUtilitiesCleanup()
topologically and geometrically regular array of data
An actor that displays text.
a simple class to control print indentation
abstract specification for Viewports
virtual bool GetBoundingBox(vtkTextProperty *tprop, const char *str, int dpi, int bbox[4])=0
Determine the dimensions of the image that RenderString will produce for a given str,...
represent text properties.
virtual ~vtkMathTextUtilities()
virtual void SetScaleToPowerOfTwo(bool scale)=0
static vtkMathTextUtilities * New()
This is a singleton pattern New.