43#ifndef vtkTextRenderer_h
44#define vtkTextRenderer_h
48#include "vtkRenderingCoreModule.h"
60class RegularExpression;
161 vtkSetMacro(DefaultBackend,
int);
162 vtkGetMacro(DefaultBackend,
int);
190 return this->GetBoundingBoxInternal(tprop, str, bbox, dpi, backend);
193 "str, int bbox[4], int dpi, int backend)")
195 int backend = Default);
205 int backend = Default)
207 return this->GetMetricsInternal(tprop, str, metrics, dpi, backend);
210 "Metrics& metrics, int dpi, int backend)")
212 int backend = Default);
231 int textDims[2],
int dpi,
int backend = Default)
233 return this->RenderStringInternal(tprop, str,
data, textDims, dpi, backend);
236 "vtkImageData* data, int textDims[2], int dpi, int backend)")
238 int textDims[2],
int dpi,
int backend = Default);
249 int targetHeight,
int dpi,
int backend = Default)
251 return this->GetConstrainedFontSizeInternal(
252 str, tprop, targetWidth, targetHeight, dpi, backend);
255 "Use int GetConstrainedFontSize(const vtkStdString& str, vtkTextProperty* tprop, int "
256 "targetWidth, int targetHeight, int dpi, int backend)")
258 int targetHeight,
int dpi,
int backend = Default);
272 return this->StringToPathInternal(tprop, str, path, dpi, backend);
275 "vtkPath* path, int dpi, int backend)")
277 int backend = Default);
286 void SetScaleToPowerOfTwo(
bool scale) { this->SetScaleToPowerOfTwoInternal(
scale); }
301 "vtkStdString& str, int bbox[4], int dpi, int backend)")
302 virtual
bool GetBoundingBoxInternal(
304 virtual
bool GetMetricsInternal(
307 "str,
Metrics& metrics,
int dpi,
int backend)")
309 Metrics& metrics,
int dpi,
int backend) = 0;
314 "
data,
int textDims[2],
int dpi,
int backend)")
318 int targetWidth,
int targetHeight,
int dpi,
int backend) = 0;
321 "targetWidth,
int targetHeight,
int dpi,
int backend)")
323 int targetWidth,
int targetHeight,
int dpi,
int backend) = 0;
324 virtual
bool StringToPathInternal(
328 virtual
bool StringToPathInternal(
330 virtual
void SetScaleToPowerOfTwoInternal(
bool scale) = 0;
347 vtksys::RegularExpression* MathTextRegExp;
348 vtksys::RegularExpression* MathTextRegExp2;
349 vtksys::RegularExpression* MathTextRegExpColumn;
topologically and geometrically regular array of data
a simple class to control print indentation
abstract base class for most VTK objects
concrete dataset representing a path defined by Bezier curves.
Wrapper around std::string to keep symbols short.
represent text properties.
~vtkTextRendererCleanup()
Interface for generating images and path data from string data, using multiple backends.
virtual int DetectBackend(const vtkUnicodeString &str)
Determine the appropriate back end needed to render the given string.
virtual bool MathTextIsSupported()
static vtkTextRenderer * New()
This is a singleton pattern New.
bool GetBoundingBox(vtkTextProperty *tprop, const vtkStdString &str, int bbox[4], int dpi, int backend=Default)
Given a text property and a string, get the bounding box {xmin, xmax, ymin, ymax} of the rendered str...
virtual bool GetBoundingBoxInternal(vtkTextProperty *tprop, const vtkStdString &str, int bbox[4], int dpi, int backend)=0
Virtual methods for concrete implementations of the public methods.
Backend
Available backends.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual bool FreeTypeIsSupported()
Test for availability of various backends.
virtual int DetectBackend(const vtkStdString &str)
Determine the appropriate back end needed to render the given string.
static vtkTextRenderer * GetInstance()
Return the singleton instance with no reference counting.
~vtkTextRenderer() override
String class that stores Unicode text.
Some derived classes for the different vectors commonly used.
vtkVector2i BottomRight
The corners of the rendered text (or background, if applicable), in pixels.
vtkVector2i Descent
Vectors representing the rotated ascent and descent of the text.
vtkVector2i Ascent
Vectors representing the rotated ascent and descent of the text.
Metrics()
Construct a Metrics object with all members initialized to 0.
vtkVector2i TopRight
The corners of the rendered text (or background, if applicable), in pixels.
vtkVector2i BottomLeft
The corners of the rendered text (or background, if applicable), in pixels.
vtkVector2i TopLeft
The corners of the rendered text (or background, if applicable), in pixels.
vtkTuple< int, 4 > BoundingBox
The axis-aligned bounding box of the rendered text and background, in pixels.
#define VTK_DEPRECATED_IN_9_1_0(reason)