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);
130 int GetGlyphIndex(
vtkTextProperty *tprop, FT_UInt32 c, FT_UInt *gindex);
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]);
189 void MapTextPropertyToId(
vtkTextProperty *tprop,
unsigned long *tprop_cache_id);
190 void MapIdToTextProperty(
unsigned long tprop_cache_id,
vtkTextProperty *tprop);
196 int GetSize(
unsigned long tprop_cache_id,
int font_size, FT_Size *
size);
197 int GetFace(
unsigned long tprop_cache_id, FT_Face *face);
198 int GetGlyphIndex(
unsigned long tprop_cache_id, FT_UInt32 c,
200 int GetGlyph(
unsigned long tprop_cache_id,
204 int request = GLYPH_REQUEST_DEFAULT);
213 void GetWidthHeightDescender(
const char *str,
240 int totalWidth,
int *x,
int *y);
249 #ifdef FTGL_USE_NAMESPACE
259 double override_color[3] = NULL);
279 #ifdef VTK_FREETYPE_CACHING_SUPPORTED
280 FTC_Manager *CacheManager;
281 FTC_ImageCache *ImageCache;
282 FTC_CMapCache *CMapCache;
286 FTC_Manager* GetCacheManager();
287 FTC_ImageCache* GetImageCache();
288 FTC_CMapCache* GetCMapCache();
292 unsigned int MaximumNumberOfFaces;
293 unsigned int MaximumNumberOfSizes;
294 unsigned long MaximumNumberOfBytes;
296 void InitializeCacheManager();
297 void ReleaseCacheManager();
301 void PrintEntry(
int i,
char *msg = 0);
302 void ReleaseEntry(
int i);
304 void InitializeCache();
abstract base class for most VTK objects
abstract specification for Viewports
#define VTK_UNSIGNED_LONG_MAX
#define VTKRENDERINGFREETYPE_EXPORT
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
#define VTK_UNSIGNED_INT_MAX
represent text properties.
FreeType library support.
vtkTextProperty * TextProperty