28 #ifndef __vtkFreeTypeUtilities_h
29 #define __vtkFreeTypeUtilities_h
31 #define VTK_FTFC_CACHE_CAPACITY 150
45 #include "vtk_freetype.h"
46 #include FT_FREETYPE_H
49 #if (FREETYPE_MAJOR >2 ||(FREETYPE_MAJOR == 2 && ( FREETYPE_MINOR > 1 || (FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 9))))
52 # define VTK_FREETYPE_CACHING_SUPPORTED
55 #ifdef FTGL_USE_NAMESPACE
60 #ifdef FTGL_USE_NAMESPACE
99 FT_Library* GetLibrary();
106 vtkGetMacro(MaximumNumberOfFaces,
unsigned int);
108 vtkGetMacro(MaximumNumberOfSizes,
unsigned int);
110 vtkGetMacro(MaximumNumberOfBytes,
unsigned long);
147 GLYPH_REQUEST_DEFAULT = 0,
148 GLYPH_REQUEST_BITMAP = 1,
149 GLYPH_REQUEST_OUTLINE = 2
155 int request = GLYPH_REQUEST_DEFAULT);
168 int GetBoundingBox(
vtkTextProperty *tprop,
const char *str,
int bbox[4]);
169 int IsBoundingBoxValid(
int bbox[4]);
197 void MapTextPropertyToId(
vtkTextProperty *tprop,
unsigned long *tprop_cache_id);
198 void MapIdToTextProperty(
unsigned long tprop_cache_id,
vtkTextProperty *tprop);
204 int GetSize(
unsigned long tprop_cache_id,
int font_size, FT_Size *
size);
205 int GetFace(
unsigned long tprop_cache_id, FT_Face *
face);
206 int GetGlyphIndex(
unsigned long tprop_cache_id, FT_UInt32
c,
208 int GetGlyph(
unsigned long tprop_cache_id,
212 int request = GLYPH_REQUEST_DEFAULT);
221 void GetWidthHeightDescender(
const char *str,
248 int totalWidth,
int *
x,
int *
y);
257 #ifdef FTGL_USE_NAMESPACE
267 double override_color[3] = NULL);
287 #ifdef VTK_FREETYPE_CACHING_SUPPORTED
288 FTC_Manager *CacheManager;
289 FTC_ImageCache *ImageCache;
290 FTC_CMapCache *CMapCache;
294 FTC_Manager* GetCacheManager();
295 FTC_ImageCache* GetImageCache();
296 FTC_CMapCache* GetCMapCache();
300 unsigned int MaximumNumberOfFaces;
301 unsigned int MaximumNumberOfSizes;
302 unsigned long MaximumNumberOfBytes;
304 void InitializeCacheManager();
305 void ReleaseCacheManager();
309 void PrintEntry(
int i,
char *msg = 0);
310 void ReleaseEntry(
int i);
312 void InitializeCache();
GLsizei GLsizei GLenum GLenum const GLvoid * data
abstract base class for most VTK objects
abstract specification for Viewports
#define VTK_UNSIGNED_LONG_MAX
#define VTKRENDERINGFREETYPE_EXPORT
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
GLint GLint GLint GLint GLint x
An actor that displays text. Scaled or unscaled.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
topologically and geometrically regular array of data
#define VTK_FTFC_CACHE_CAPACITY
GLint GLint GLsizei width
#define VTK_UNSIGNED_INT_MAX
represent text properties.
FreeType library support.
vtkTextProperty * TextProperty
GLenum GLuint GLint GLenum face