MCPcopy Create free account
hub / github.com/Kitware/VTK / GetFace

Method GetFace

Rendering/FreeType/vtkFreeTypeTools.cxx:730–755  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

728
729//------------------------------------------------------------------------------
730bool vtkFreeTypeTools::GetFace(size_t tprop_cache_id, FT_Face* face)
731{
732 if (!face)
733 {
734 vtkErrorMacro(<< "Wrong parameters, face is nullptr");
735 return false;
736 }
737
738 FTC_Manager* manager = this->GetCacheManager();
739 if (!manager)
740 {
741 vtkErrorMacro(<< "Failed querying the cache manager !");
742 return false;
743 }
744
745 // Map the id of a text property in the cache to a FTC_FaceID
746 FTC_FaceID face_id = reinterpret_cast<FTC_FaceID>(tprop_cache_id);
747
748 FT_Error error = FTC_Manager_LookupFace(*manager, face_id, face);
749 if (error)
750 {
751 vtkErrorMacro(<< "Failed looking up a FreeType Face");
752 }
753
754 return !error;
755}
756
757//------------------------------------------------------------------------------
758bool vtkFreeTypeTools::GetFace(vtkTextProperty* tprop, FT_Face* face)

Callers 3

GetFaceMetricsMethod · 0.95
GetUnscaledKerningMethod · 0.95
ComputeSurfaceNormalMethod · 0.45

Calls 3

GetCacheManagerMethod · 0.95
MapTextPropertyToIdMethod · 0.95
FTC_Manager_LookupFaceFunction · 0.85

Tested by

no test coverage detected