------------------------------------------------------------------------------
| 1234 | |
| 1235 | //------------------------------------------------------------------------------ |
| 1236 | bool 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 | |
| 1264 | VTK_ABI_NAMESPACE_END |
| 1265 |
no test coverage detected