26#ifndef vtkFreeTypeTools_h
27#define vtkFreeTypeTools_h
30#include "vtkRenderingFreeTypeModule.h"
42#include "vtk_freetype.h"
50class vtkTextPropertyLookup;
138 vtkTextProperty* tprop, vtkTypeUInt32 leftChar, vtkTypeUInt32 rightChar);
187 int textDims[2] =
nullptr);
220 static vtkTypeUInt32
HashBuffer(
const void* buffer,
size_t n, vtkTypeUInt32 hash = 0);
340 bool GetSize(
size_t tprop_cache_id,
int font_size, FT_Size* size);
341 bool GetSize(FTC_Scaler scaler, FT_Size* size);
342 bool GetFace(
size_t tprop_cache_id, FT_Face* face);
344 bool GetGlyph(
size_t tprop_cache_id,
int font_size, FT_UInt gindex, FT_Glyph* glyph,
367 FT_Bitmap*
GetBitmap(FT_UInt32 c,
size_t prop_cache_id,
int prop_font_size, FT_UInt& gindex,
368 FT_BitmapGlyph& bitmap_glyph);
370 FT_UInt32 c, FTC_Scaler scaler, FT_UInt& gindex, FT_BitmapGlyph& bitmap_glyph);
377 FT_Outline*
GetOutline(FT_UInt32 c,
size_t prop_cache_id,
int prop_font_size, FT_UInt& gindex,
378 FT_OutlineGlyph& outline_glyph);
380 FT_UInt32 c, FTC_Scaler scaler, FT_UInt& gindex, FT_OutlineGlyph& outline_glyph);
433 bool RenderStringInternal(
446 bool CalculateBoundingBox(
const vtkStdString& str, MetaData& metaData);
447 bool CalculateBoundingBox(
448 const std::string& str, MetaData& metaData,
const std::string& defaultHeightString);
456 template <
typename DataType>
457 bool PopulateData(
const std::string& str, DataType data, MetaData& metaData);
462 template <
typename DataType>
463 bool RenderLine(std::string::const_iterator begin, std::string::const_iterator end,
int lineIndex,
464 DataType data, MetaData& metaData);
470 bool RenderCharacter(FT_UInt32 codepoint,
int& x,
int& y, FT_UInt& previousGlyphIndex,
472 bool RenderCharacter(FT_UInt32 codepoint,
int& x,
int& y, FT_UInt& previousGlyphIndex,
473 vtkPath* path, MetaData& metaData);
476 void OutlineToPath(
int x,
int y, FT_Outline* outline,
vtkPath* path);
484 const std::string& str, MetaData& metaData,
int targetWidth,
int targetHeight);
494 void GetLineMetrics(std::string::const_iterator begin, std::string::const_iterator end,
495 MetaData& metaData,
int& width,
int bbox[4]);
topologically and geometrically regular array of data
a simple class to control print indentation
concrete dataset representing a path defined by Bezier curves.
Hold a reference to a vtkObjectBase instance.
Wrapper around std::string to keep symbols short.
represent text properties.
#define VTK_UNSIGNED_LONG_MAX
#define VTK_UNSIGNED_INT_MAX