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

Method StringToPathInternal

Rendering/FreeType/vtkFreeTypeTools.cxx:1236–1262  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1234
1235//------------------------------------------------------------------------------
1236bool vtkFreeTypeTools::StringToPathInternal(
1237 vtkTextProperty* tprop, const std::string& str, int dpi, vtkPath* path)
1238{
1239 // Setup the metadata
1240 MetaData metaData;
1241 if (!this->PrepareMetaData(tprop, dpi, metaData))
1242 {
1243 vtkErrorMacro(<< "Could not prepare metadata.");
1244 return false;
1245 }
1246
1247 // Layout the text, calculate bounding box
1248 if (!this->CalculateBoundingBox(str, metaData))
1249 {
1250 vtkErrorMacro(<< "Could not calculate bounding box.");
1251 return false;
1252 }
1253
1254 // Create the path
1255 if (!this->PopulateData(str, path, metaData))
1256 {
1257 vtkErrorMacro(<< "Could not populate path.");
1258 return false;
1259 }
1260
1261 return true;
1262}
1263
1264VTK_ABI_NAMESPACE_END
1265

Callers 2

StringToPathMethod · 0.95
StringToPathFunction · 0.45

Calls 3

PrepareMetaDataMethod · 0.95
CalculateBoundingBoxMethod · 0.95
PopulateDataMethod · 0.95

Tested by

no test coverage detected