* Returns the rendered text's height. Useful to check if wordwrap applies. * @param line Line to get the height, or -1 to get whole text height. * @return Height in pixels. */
| 299 | * @return Height in pixels. |
| 300 | */ |
| 301 | int Text::getTextHeight(int line) const |
| 302 | { |
| 303 | if (line == -1) |
| 304 | { |
| 305 | int height = 0; |
| 306 | for (std::vector<int>::const_iterator i = _lineHeight.begin(); i != _lineHeight.end(); ++i) |
| 307 | { |
| 308 | height += *i; |
| 309 | } |
| 310 | return height; |
| 311 | } |
| 312 | else |
| 313 | { |
| 314 | return _lineHeight[line]; |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | /** |
| 319 | * Returns the rendered text's width. |
no outgoing calls
no test coverage detected