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

Method PopulateData

Rendering/FreeType/vtkFreeTypeTools.cxx:1756–1778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1754//------------------------------------------------------------------------------
1755template <typename DataType>
1756bool vtkFreeTypeTools::PopulateData(const std::string& str, DataType data, MetaData& metaData)
1757{
1758 // Go through the string, line by line
1759 std::string::const_iterator beginLine = str.begin();
1760 std::string::const_iterator endLine = std::find(beginLine, str.end(), '\n');
1761
1762 int lineIndex = 0;
1763 while (endLine != str.end())
1764 {
1765 if (!this->RenderLine(beginLine, endLine, lineIndex, data, metaData))
1766 {
1767 return false;
1768 }
1769
1770 beginLine = endLine;
1771 ++beginLine;
1772 endLine = std::find(beginLine, str.end(), '\n');
1773 ++lineIndex;
1774 }
1775
1776 // Render the last line:
1777 return this->RenderLine(beginLine, endLine, lineIndex, data, metaData);
1778}
1779
1780//------------------------------------------------------------------------------
1781template <typename DataType>

Callers 2

RenderStringInternalMethod · 0.95
StringToPathInternalMethod · 0.95

Calls 4

RenderLineMethod · 0.95
findFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected