Move wrapping to Font::getWrap and make printf use that (fixes issue #230)

This commit is contained in:
Bart van Strien
2011-09-03 14:31:31 +02:00
parent f9084c4625
commit 190e11d016
4 changed files with 52 additions and 74 deletions
+4 -4
View File
@@ -135,12 +135,12 @@ namespace opengl
* Returns the maximal width of a wrapped string
* and optionally the number of lines
*
* @param line A line of text
* @param text The input text
* @param wrap The number of pixels to wrap at
* @param lines Optional output of the number of lines needed
* @param max_width Optional output of the maximum width
* Returns a vector with the lines.
**/
int getWrap(const std::string & line, float wrap, int *lines = 0);
int getWrap(const char * line, float wrap, int *lines = 0);
std::vector<std::string> getWrap(const std::string text, float wrap, int * max_width = 0);
/**
* Sets the line height (which should be a number to multiply the font size by,