<!-- clanlib header begin --> <HTML> <HEAD> <TITLE>CL_TextStyler::get_height - ClanLib Game SDK</TITLE> <STYLE TYPE="text/css"><!-- HTML BODY { font-family: verdana, helvetica, sans-serif; font-size: 12px; } H1 { font-size: 22px; } H2 { font-size: 18px; } H3 { font-size: 16px; } H4 { font-size: 14px; } P { font-size: 12px; } LI { font-size: 12px; } --></STYLE> </HEAD> <body bgcolor=white text=black link=blue vlink=#800080> <center> <img src="http://clanlib.org/gfx/clanlib.png"> </center> <!-- clanlib header end --> <center> <p> <a href="http://clanlib.org/docs.html">Home</a> | <a href="classes.html">All Classes</a> | <a href="modules.html">Grouped Classes</a> | <a href="index.html">Index</a> | <a href="search.html">Search</a> </p> </center> <h1>CL_TextStyler::get_height</h1> <p> Returns the drawn height of some source text, or of the default font if no arguments passed.</p> <pre> int get_height(); int get_height( const std::string& str, CL_Size max_size = CL_Size(0, 0)); int get_height( std::string::const_iterator start, std::string::const_iterator end, CL_Size max_size = CL_Size(0, 0)); </pre> <p><b>Parameters:</b></p> <dl> <dt><i>str</i></dt><dd>The source string to parse and render.</dd> <dt><i>start</i></dt><dd>A starting iterator, inclusive.</dd> <dt><i>end</i></dt><dd>An ending iterator, exclusive.</dd> <dt><i>max_size</i></dt><dd>Acts like the size of a dest rectangle passed to draw(), for height truncating and word wrapping.</dd> </dl> <p><b>Return value:</b></p> <p>The height in pixels.<br></p> <p><b>Detailed description:</b></p> <p> Generally, get_height(" ") will return zero, since usually the space glyph isn't given in the font, and so it has a height and width of zero. Calling get_height() on a CL_TextStyler without arguments is the same as calling get_height() without arguments on that CL_TextStyler's default font.</p> <p><b>See also:</b></p> <p><a href="CL_Size.html">CL_Size</a> | <a href="CL_TextStyler.html">CL_TextStyler</a></p> <!-- clanlib footer begin --> <center><br><br><font color="#a0a0a0"> Questions or comments, write to the <a href="http://clanlib.org/contact.html">ClanLib mailing list</a>. </font></center> </body> </html> <!-- clanlib footer end -->