< index
< 2. Console emulator
< 2.2 Drawing on the root console

=====================================
Drawing an horizontal line
=====================================

C++ : void TCODConsole::hline(int x,int y, int l, TCOD_bkgnd_flag_t flag = TCOD_BKGND_SET)
C   : void TCOD_console_hline(TCOD_console_t con,int x,int y, int l, TCOD_bkgnd_flag_t flag)
Py  : console_hline(con,x,y,l,flag)

Draws an horizontal line in the console, using ASCII code TCOD_CHAR_HLINE (196), and the console's default background/foreground colors.
ParameterDescription
conIn the C version, the offscreen console handler or NULL for the root console.
x,yCoordinates of the line's left end in the console.
0 <= x < console width
0 <= y < console height
lThe length of the line in cells 1 <= l <= console width - x
flagOperation on the background color
insert a comment