35#ifndef TCOD_CONSOLE_DRAWING_H_
36#define TCOD_CONSOLE_DRAWING_H_
59TCOD_DEPRECATED(
"Use TCOD_console_draw_rect_rgb instead.")
73TCOD_DEPRECATED(
"Use TCOD_console_draw_rect_rgb instead.")
87TCOD_DEPRECATED(
"Use TCOD_console_draw_rect_rgb instead.")
102 const TCOD_color_t* fg,
103 const TCOD_color_t* bg,
119 const TCOD_color_t* fg,
120 const TCOD_color_t* bg,
146 const
int* __restrict decoration,
178inline void draw_rect(
179 TCOD_Console& console,
180 const std::array<int, 4>& rect,
182 std::optional<TCOD_ColorRGB> fg,
183 std::optional<TCOD_ColorRGB> bg,
185 const TCOD_ColorRGB* fg_ptr = fg ? &fg.value() :
nullptr;
186 const TCOD_ColorRGB* bg_ptr = bg ? &bg.value() :
nullptr;
216inline void draw_frame(
217 TCOD_Console& console,
218 const std::array<int, 4>& rect,
219 const std::array<int, 9>& decoration,
220 std::optional<TCOD_ColorRGB> fg,
221 std::optional<TCOD_ColorRGB> bg,
224 const TCOD_ColorRGB* fg_ptr = fg ? &fg.value() :
nullptr;
225 const TCOD_ColorRGB* bg_ptr = bg ? &bg.value() :
nullptr;
227 &console, rect.at(0), rect.at(1), rect.at(2), rect.at(3), decoration.data(), fg_ptr, bg_ptr, flag, clear));
C types for console functions.
TCOD_Error
An enum of libtcod error codes.
Definition error.h:48
TCOD_Error TCOD_console_draw_rect_rgb(TCOD_Console *console, int x, int y, int width, int height, int ch, const TCOD_color_t *fg, const TCOD_color_t *bg, TCOD_bkgnd_flag_t flag)
Draw a rectangle on a console with a shape of x,y,width,height.
void TCOD_console_put_rgb(TCOD_Console *console, int x, int y, int ch, const TCOD_color_t *fg, const TCOD_color_t *bg, TCOD_bkgnd_flag_t flag)
Place a single tile on a console at x,y.
void TCOD_console_hline(TCOD_Console *con, int x, int y, int l, TCOD_bkgnd_flag_t flag)
Draw a horizontal line using the default colors.
TCOD_bkgnd_flag_t
Background color blend modes.
Definition console.h:60
TCOD_Error TCOD_console_draw_frame_rgb(struct TCOD_Console *con, int x, int y, int width, int height, const int *decoration, const TCOD_ColorRGB *fg, const TCOD_ColorRGB *bg, TCOD_bkgnd_flag_t flag, bool clear)
Draw a decorated frame onto console with the shape of x, y, width, height.
void TCOD_console_vline(TCOD_Console *con, int x, int y, int l, TCOD_bkgnd_flag_t flag)
Draw a vertical line using the default colors.
void TCOD_console_rect(TCOD_Console *con, int x, int y, int rw, int rh, bool clear, TCOD_bkgnd_flag_t flag)
Draw a rectangle onto a console.
The libtcod namespace.
Definition color.hpp:45
int check_throw_error(int error)
Check and throw error messages.
Definition error.hpp:57
A 3-channel RGB color struct.
Definition color.h:48
A libtcod console containing a grid of tiles with {ch, fg, bg} information.
Definition console.h:121