------------------------------------------------------------------------------
| 394 | |
| 395 | //------------------------------------------------------------------------------ |
| 396 | void vtkFreeTypeTools::InitializeCacheManager() |
| 397 | { |
| 398 | this->ReleaseCacheManager(); |
| 399 | |
| 400 | FT_Error error; |
| 401 | |
| 402 | // Create the cache manager itself |
| 403 | this->CacheManager = new FTC_Manager; |
| 404 | |
| 405 | error = this->CreateFTCManager(); |
| 406 | |
| 407 | if (error) |
| 408 | { |
| 409 | vtkErrorMacro(<< "Failed allocating a new FreeType Cache Manager"); |
| 410 | } |
| 411 | |
| 412 | // The image cache |
| 413 | this->ImageCache = new FTC_ImageCache; |
| 414 | error = FTC_ImageCache_New(*this->CacheManager, this->ImageCache); |
| 415 | |
| 416 | if (error) |
| 417 | { |
| 418 | vtkErrorMacro(<< "Failed allocating a new FreeType Image Cache"); |
| 419 | } |
| 420 | |
| 421 | // The charmap cache |
| 422 | this->CMapCache = new FTC_CMapCache; |
| 423 | error = FTC_CMapCache_New(*this->CacheManager, this->CMapCache); |
| 424 | |
| 425 | if (error) |
| 426 | { |
| 427 | vtkErrorMacro(<< "Failed allocating a new FreeType CMap Cache"); |
| 428 | } |
| 429 | } |
| 430 | |
| 431 | //------------------------------------------------------------------------------ |
| 432 | void vtkFreeTypeTools::ReleaseCacheManager() |
no test coverage detected