Function TCOD_console_get_height_rect_n¶
Defined in File console_printing.h
Function Documentation¶
-
int TCOD_console_get_height_rect_n(TCOD_Console *console, int x, int y, int width, int height, size_t n, const char *str)
Return the height of the word-wrapped text with the given parameters.
New in version 1.19.
- Parameters
console – A pointer to a TCOD_Console.
x – The starting X position, starting from the left-most tile as zero.
y – The starting Y position, starting from the upper-most tile as zero.
width – The maximum width of the bounding region in tiles.
height – The maximum height of the bounding region in tiles.
n – The length of the string buffer
str[n]
in bytes.str – The text to print. This string can contain libtcod color codes.
- Returns
int The height of the word-wrapped text as if it were printed, or a negative error code on failure.