Function TCOD_console_vprintf_rect¶
Defined in File console_printing.h
Function Documentation¶
-
int TCOD_console_vprintf_rect(TCOD_Console *console, int x, int y, int width, int height, const TCOD_color_t *fg, const TCOD_color_t *bg, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const char *fmt, va_list args)
Print a formatted string using a va_list within a bounding box.
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.
fg – The foreground color. The printed text is set to this color. If NULL then the foreground will be left unchanged, inheriting the previous value of the tile.
bg – The background color. The background tile under the printed text is set to this color. If NULL then the background will be left unchanged.
flag – The background blending flag. If unsure then use
TCOD_BKGND_SET
.alignment – The text justification. This is one of
TCOD_alignment_t
and is normallyTCOD_LEFT
.fmt – The format string for a vprintf-like function.
args – The arguments for the formatted string.
- Returns
TCOD_PUBLIC