< index < 2. Console emulator < 2.2 Drawing on the root console |
===================================== |
C++ : int TCODConsole::printLeftRect(int x, int y, int w, int h, TCOD_bkgnd_flag_t flag, const char *fmt, ...) C : int TCOD_console_print_left_rect(TCOD_console_t con,int x, int y, int w, int h, TCOD_bkgnd_flag_t flag, const char *fmt, ...) Py : console_print_left_rect(con,x, y, w, h, flag, fmt)This function draws a left aligned string in a rectangle inside the console, using default foreground and background colors. If the string reaches the right border of the rectangle, carriage returns are inserted.
Parameter | Description |
---|---|
con | In the C version, the offscreen console handler or NULL for the root console. |
x,y | Coordinates of the rectangle upper-left corner in the console. 0 <= x < console width 0 <= y < console height |
w,h | Size of the rectangle in the console. x <= x+w < console width y <= y+h < console height |
flag | This flag defines how the cell's background color is modified. See TCOD_bkgnd_flag_t. |
fmt | printf-like format string, eventually followed by parameters. You can use control codes to change the colors inside the string. |
C++ : int TCODConsole::getHeightLeftRect(int x, int y, int w, int h, const char *fmt, ...) C : int TCOD_console_height_left_rect(TCOD_console_t con,int x, int y, int w, int h, const char *fmt, ...) Py : console_height_left_rect(con,x, y, w, h, fmt)
Parameter | Description |
---|---|
con | In the C version, the offscreen console handler or NULL for the root console. |
x,y | Coordinates of the rectangle's upper-left position in the console. 0 <= x < console width 0 <= y < console height |
w,h | Size of the rectangle in the console. x <= x+w < console width y <= y+h < console height |
fmt | printf-like format string, eventually followed by parameters. You can use control codes to change the colors inside the string. |