45 #ifndef vtkTextRenderer_h
46 #define vtkTextRenderer_h
60 class RegularExpression;
83 TopLeft(0), TopRight(0), BottomLeft(0), BottomRight(0)
105 virtual
void PrintSelf(ostream &os,
vtkIndent indent);
138 vtkSetMacro(DefaultBackend,
int)
139 vtkGetMacro(DefaultBackend,
int)
150 virtual
bool FreeTypeIsSupported() {
return false; }
161 int bbox[4],
int dpi,
int backend = Default)
163 return this->GetBoundingBoxInternal(tprop, str, bbox, dpi, backend);
166 int bbox[4],
int dpi,
int backend = Default)
168 return this->GetBoundingBoxInternal(tprop, str, bbox, dpi, backend);
177 Metrics &metrics,
int dpi,
int backend = Default)
179 return this->GetMetricsInternal(tprop, str, metrics, dpi, backend);
182 Metrics &metrics,
int dpi,
int backend = Default)
184 return this->GetMetricsInternal(tprop, str, metrics, dpi, backend);
202 int backend = Default)
204 return this->RenderStringInternal(tprop, str, data, textDims, dpi, backend);
208 int backend = Default)
210 return this->RenderStringInternal(tprop, str, data, textDims, dpi, backend);
220 int targetWidth,
int targetHeight,
int dpi,
221 int backend = Default)
223 return this->GetConstrainedFontSizeInternal(str, tprop, targetWidth,
224 targetHeight, dpi, backend);
227 int targetWidth,
int targetHeight,
int dpi,
228 int backend = Default)
230 return this->GetConstrainedFontSizeInternal(str, tprop, targetWidth,
231 targetHeight, dpi, backend);
242 vtkPath *path,
int dpi,
int backend = Default)
244 return this->StringToPathInternal(tprop, str, path, dpi, backend);
247 vtkPath *path,
int dpi,
int backend = Default)
249 return this->StringToPathInternal(tprop, str, path, dpi, backend);
260 this->SetScaleToPowerOfTwoInternal(scale);
274 int bbox[4],
int dpi,
int backend) = 0;
277 int bbox[4],
int dpi,
int backend) = 0;
280 Metrics &metrics,
int dpi,
int backend) = 0;
283 Metrics &metrics,
int dpi,
int backend) = 0;
287 int dpi,
int backend) = 0;
291 int dpi,
int backend) = 0;
292 virtual int GetConstrainedFontSizeInternal(
const vtkStdString &str,
294 int targetWidth,
int targetHeight,
295 int dpi,
int backend) = 0;
298 int targetWidth,
int targetHeight,
299 int dpi,
int backend) = 0;
302 int dpi,
int backend) = 0;
305 int dpi,
int backend) = 0;
306 virtual void SetScaleToPowerOfTwoInternal(
bool scale) = 0;
336 #endif //vtkTextRenderer_h
bool StringToPath(vtkTextProperty *tprop, const vtkUnicodeString &str, vtkPath *path, int dpi, int backend=Default)
Wrapper around std::string to keep symbols short.
bool GetBoundingBox(vtkTextProperty *tprop, const vtkStdString &str, int bbox[4], int dpi, int backend=Default)
abstract base class for most VTK objects
concrete dataset representing a path defined by Bezier curves.
bool StringToPath(vtkTextProperty *tprop, const vtkStdString &str, vtkPath *path, int dpi, int backend=Default)
bool GetMetrics(vtkTextProperty *tprop, const vtkUnicodeString &str, Metrics &metrics, int dpi, int backend=Default)
static vtkTextRendererCleanup Cleanup
vtksys::RegularExpression * MathTextRegExp2
void SetScaleToPowerOfTwo(bool scale)
bool RenderString(vtkTextProperty *tprop, const vtkStdString &str, vtkImageData *data, int textDims[2], int dpi, int backend=Default)
vtkTuple< int, 4 > BoundingBox
bool RenderString(vtkTextProperty *tprop, const vtkUnicodeString &str, vtkImageData *data, int textDims[2], int dpi, int backend=Default)
a simple class to control print indentation
virtual bool MathTextIsSupported()
topologically and geometrically regular array of data
represent text properties.
Interface for generating images and path data from string data, using multiple backends.
bool GetMetrics(vtkTextProperty *tprop, const vtkStdString &str, Metrics &metrics, int dpi, int backend=Default)
int GetConstrainedFontSize(const vtkUnicodeString &str, vtkTextProperty *tprop, int targetWidth, int targetHeight, int dpi, int backend=Default)
#define VTKRENDERINGCORE_EXPORT
bool GetBoundingBox(vtkTextProperty *tprop, const vtkUnicodeString &str, int bbox[4], int dpi, int backend=Default)
int GetConstrainedFontSize(const vtkStdString &str, vtkTextProperty *tprop, int targetWidth, int targetHeight, int dpi, int backend=Default)
vtksys::RegularExpression * MathTextRegExp
String class that stores Unicode text.
static vtkTextRenderer * Instance