VTK
vtkMathTextFreeTypeTextRenderer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMathTextFreeTypeTextRenderer.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
30 #ifndef vtkMathTextFreeTypeTextRenderer_h
31 #define vtkMathTextFreeTypeTextRenderer_h
32 
33 #include "vtkRenderingFreeTypeModule.h" // For export macro
34 #include "vtkTextRenderer.h"
35 
36 class vtkFreeTypeTools;
38 
40  public vtkTextRenderer
41 {
42 public:
44  void PrintSelf(ostream &os, vtkIndent indent);
45 
47 
49 
50  virtual bool FreeTypeIsSupported();
51  virtual bool MathTextIsSupported();
53 
54 protected:
57 
59 
60  bool GetBoundingBoxInternal(vtkTextProperty *tprop, const vtkStdString &str,
61  int bbox[4], int dpi, int backend);
63  const vtkUnicodeString &str,
64  int bbox[4], int dpi, int backend);
65  bool GetMetricsInternal(vtkTextProperty *tprop, const vtkStdString &str,
66  Metrics &metrics, int dpi, int backend);
67  bool GetMetricsInternal(vtkTextProperty *tprop, const vtkUnicodeString &str,
68  Metrics &metrics, int dpi, int backend);
69  bool RenderStringInternal(vtkTextProperty *tprop, const vtkStdString &str,
70  vtkImageData *data, int textDims[2], int dpi,
71  int backend);
73  vtkImageData *data, int textDims[2], int dpi,
74  int backend);
76  vtkTextProperty *tprop,
77  int targetWidth, int targetHeight, int dpi,
78  int backend);
80  vtkTextProperty *tprop,
81  int targetWidth, int targetHeight, int dpi,
82  int backend);
83  bool StringToPathInternal(vtkTextProperty *tprop, const vtkStdString &str,
84  vtkPath *path, int dpi, int backend);
86  vtkPath *path, int dpi, int backend);
89 
90 private:
92  void operator=(const vtkMathTextFreeTypeTextRenderer &); // Not implemented.
93 
94  vtkFreeTypeTools *FreeTypeTools;
95  vtkMathTextUtilities *MathTextUtilities;
96 };
97 
98 #endif //vtkMathTextFreeTypeTextRenderer_h
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: vtkgl.h:11339
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
virtual bool RenderStringInternal(vtkTextProperty *tprop, const vtkStdString &str, vtkImageData *data, int textDims[2], int dpi, int backend)=0
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:34
GLenum GLenum GLenum GLenum GLenum scale
Definition: vtkgl.h:15942
virtual bool GetMetricsInternal(vtkTextProperty *tprop, const vtkStdString &str, Metrics &metrics, int dpi, int backend)=0
#define VTKRENDERINGFREETYPE_EXPORT
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
virtual bool GetBoundingBoxInternal(vtkTextProperty *tprop, const vtkStdString &str, int bbox[4], int dpi, int backend)=0
Default implementation of vtkTextRenderer.
static vtkTextRenderer * New()
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int GetConstrainedFontSizeInternal(const vtkStdString &str, vtkTextProperty *tprop, int targetWidth, int targetHeight, int dpi, int backend)=0
virtual bool MathTextIsSupported()
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
GLsizei const GLchar ** path
Definition: vtkgl.h:13835
represent text properties.
virtual bool FreeTypeIsSupported()
virtual void PrintSelf(ostream &os, vtkIndent indent)
Interface for generating images and path data from string data, using multiple backends.
virtual void SetScaleToPowerOfTwoInternal(bool scale)=0
Abstract interface to equation rendering.
virtual bool StringToPathInternal(vtkTextProperty *tprop, const vtkStdString &str, vtkPath *path, int dpi, int backend)=0
FreeType library support.
String class that stores Unicode text.