28 #ifndef vtkFreeTypeTools_h 29 #define vtkFreeTypeTools_h 42 #include "vtk_freetype.h" 43 #include FT_FREETYPE_H 50 class vtkTextPropertyLookup;
85 FT_Library* GetLibrary();
151 int targetWidth,
int targetHeight);
154 int targetWidth,
int targetHeight);
159 static vtkTypeUInt16 HashString(const
char *str);
170 void MapTextPropertyToId(
vtkTextProperty *tprop,
unsigned long *tprop_cache_id);
171 void MapIdToTextProperty(
unsigned long tprop_cache_id,
vtkTextProperty *tprop);
201 virtual FT_Error CreateFTCManager();
210 ImageMetaData &metaData);
220 ImageMetaData &metaData);
252 GLYPH_REQUEST_DEFAULT = 0,
253 GLYPH_REQUEST_BITMAP = 1,
254 GLYPH_REQUEST_OUTLINE = 2
259 int request = GLYPH_REQUEST_DEFAULT);
260 bool GetSize(
unsigned long tprop_cache_id,
int font_size, FT_Size *
size);
261 bool GetFace(
unsigned long tprop_cache_id, FT_Face *
face);
262 bool GetGlyphIndex(
unsigned long tprop_cache_id, FT_UInt32
c,
264 bool GetGlyph(
unsigned long tprop_cache_id,
268 int request = GLYPH_REQUEST_DEFAULT);
280 FT_Face &
face,
bool &face_has_kerning);
285 FT_Bitmap* GetBitmap(FT_UInt32
c,
unsigned long prop_cache_id,
286 int prop_font_size, FT_UInt &gindex,
287 FT_BitmapGlyph &bitmap_glyph);
292 FT_Outline* GetOutline(FT_UInt32
c,
unsigned long prop_cache_id,
293 int prop_font_size, FT_UInt &gindex,
294 FT_OutlineGlyph &outline_glyph);
316 FTC_Manager* GetCacheManager();
317 FTC_ImageCache* GetImageCache();
318 FTC_CMapCache* GetCMapCache();
328 void InitializeCacheManager();
329 void ReleaseCacheManager();
337 template <
typename StringType>
338 bool RenderStringInternal(
vtkTextProperty *tprop,
const StringType &str,
344 template <
typename StringType>
345 bool StringToPathInternal(
vtkTextProperty *tprop,
const StringType &str,
352 template <
typename T>
353 bool CalculateBoundingBox(
const T& str, MetaData &metaData);
360 template <
typename StringType,
typename DataType>
361 bool PopulateData(
const StringType& str, DataType
data, MetaData &metaData);
367 template <
typename IteratorType,
typename DataType>
368 bool RenderLine(IteratorType begin, IteratorType
end,
int lineIndex,
369 DataType
data, MetaData &metaData);
375 template <
typename CharType>
376 bool RenderCharacter(CharType character,
int &
x,
int &
y,
379 template <
typename CharType>
380 bool RenderCharacter(CharType character,
int &
x,
int &
y,
389 template <
typename T>
390 int FitStringToBBox(
const T &str, MetaData &metaData,
int targetWidth,
401 void GetLineMetrics(T begin, T
end, MetaData &metaData,
int &
width,
GLsizei GLsizei GLenum GLenum const GLvoid * data
Wrapper around std::string to keep symbols short.
abstract base class for most VTK objects
GLenum GLsizei GLenum GLenum const GLvoid * image
concrete dataset representing a path defined by Bezier curves.
#define vtkGetMacro(name, type)
#define VTK_UNSIGNED_LONG_MAX
#define vtkSetClampMacro(name, type, min, max)
#define VTKRENDERINGFREETYPE_EXPORT
GLint GLint GLint GLint GLint GLint y
#define vtkTypeMacro(thisClass, superclass)
GLint GLint GLint GLint GLint x
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
topologically and geometrically regular array of data
GLint GLint GLsizei width
#define VTK_UNSIGNED_INT_MAX
GLsizei const GLchar ** path
represent text properties.
Interface for generating images and path data from string data, using multiple backends.
#define vtkBooleanMacro(name, type)
GLenum GLuint GLint GLenum face
String class that stores Unicode text.
#define vtkSetMacro(name, type)