< index
< 5. Image toolkit

=====================================
5.1 Creating an empty image
=====================================

You can create an image of any size, filled with the root console's background color or with black if the root console is not initialized, with :

C++ : TCODImage::TCODImage(int width, int height)
C   : TCOD_image_t TCOD_image_new(int width, int height)
Py  : image_new( width, height)

ParameterDescription
width, heightSize of the image in pixels.
Example :

C++ : TCODImage *pix = new TCODImage(80,50);
C   : TCOD_image_t pix = TCOD_image_new(80,50);
Py  : pix = litbcod.image_new(80,50)

insert a comment