VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
46  static vtkMathTextFreeTypeTextRenderer *New();
47 
48 protected:
50  ~vtkMathTextFreeTypeTextRenderer();
51 
53 
54  bool GetBoundingBoxInternal(vtkTextProperty *tprop, const vtkStdString &str,
55  int bbox[4], int dpi, int backend);
56  bool GetBoundingBoxInternal(vtkTextProperty *tprop,
57  const vtkUnicodeString &str,
58  int bbox[4], int dpi, int backend);
59  bool RenderStringInternal(vtkTextProperty *tprop, const vtkStdString &str,
60  vtkImageData *data, int textDims[2], int dpi,
61  int backend);
62  bool RenderStringInternal(vtkTextProperty *tprop, const vtkUnicodeString &str,
63  vtkImageData *data, int textDims[2], int dpi,
64  int backend);
65  int GetConstrainedFontSizeInternal(const vtkStdString &str,
66  vtkTextProperty *tprop,
67  int targetWidth, int targetHeight, int dpi,
68  int backend);
69  int GetConstrainedFontSizeInternal(const vtkUnicodeString &str,
70  vtkTextProperty *tprop,
71  int targetWidth, int targetHeight, int dpi,
72  int backend);
73  bool StringToPathInternal(vtkTextProperty *tprop, const vtkStdString &str,
74  vtkPath *path, int backend);
75  bool StringToPathInternal(vtkTextProperty *tprop, const vtkUnicodeString &str,
76  vtkPath *path, int backend);
77  void SetScaleToPowerOfTwoInternal(bool scale);
79 
80 private:
81  vtkMathTextFreeTypeTextRenderer(const vtkMathTextFreeTypeTextRenderer &); // Not implemented.
82  void operator=(const vtkMathTextFreeTypeTextRenderer &); // Not implemented.
83 
84  vtkFreeTypeTools *FreeTypeTools;
85  vtkMathTextUtilities *MathTextUtilities;
86 };
87 
88 #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
concrete dataset representing a path defined by Bezier curves.
Definition: vtkPath.h:34
GLenum GLenum GLenum GLenum GLenum scale
Definition: vtkgl.h:15942
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
#define VTKRENDERINGFREETYPE_EXPORT
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
Default implementation of vtkTextRenderer.
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
GLsizei const GLchar ** path
Definition: vtkgl.h:13835
represent text properties.
Interface for generating images and path data from string data, using multiple backends.
Abstract interface to equation rendering.
FreeType library support.
String class that stores Unicode text.