< index
< 5. Image toolkit

=====================================
5.4 Filling an image with a color
=====================================

You can fill the whole image with a color with :

C++ : void TCODImage::clear(const TCODColor color)
C   : void TCOD_image_clear(TCOD_image_t image, TCOD_color_t color)
Py  : image_clear(image,color)

ParameterDescription
imageIn the C and python version, the image to fill.
colorThe color to use.
Example :

C++ : pix->clear(TCODColor::red);
C   : TCOD_image_clear(pix,TCOD_red);
Py  : libtcod.image_clear(pix,libtcod.red)

insert a comment