| 1754 | //------------------------------------------------------------------------------ |
| 1755 | template <typename DataType> |
| 1756 | bool 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 | //------------------------------------------------------------------------------ |
| 1781 | template <typename DataType> |
no test coverage detected