49 float fwidth, fheight;
50 TCOD_ColorRGB* __restrict buf;
56 struct TCOD_mipmap_* __restrict mipmaps;
63TCODLIB_API
TCOD_Image* TCOD_image_new(
int width,
int height);
74TCODLIB_API
void TCOD_image_clear(
TCOD_Image* image, TCOD_color_t color);
75TCODLIB_API
void TCOD_image_invert(
TCOD_Image* image);
76TCODLIB_API
void TCOD_image_hflip(
TCOD_Image* image);
77TCODLIB_API
void TCOD_image_rotate90(
TCOD_Image* image,
int numRotations);
78TCODLIB_API
void TCOD_image_vflip(
TCOD_Image* image);
79TCODLIB_API
void TCOD_image_scale(
TCOD_Image* image,
int new_w,
int new_h);
81TCODLIB_API
TCOD_Image* TCOD_image_load(
const char* filename);
93TCODLIB_API
void TCOD_image_get_size(
const TCOD_Image* image,
int* w,
int* h);
94TCODLIB_API TCOD_color_t TCOD_image_get_pixel(
const TCOD_Image* image,
int x,
int y);
95TCODLIB_API
int TCOD_image_get_alpha(
const TCOD_Image* image,
int x,
int y);
103TCODLIB_API
void TCOD_image_put_pixel(
TCOD_Image* image,
int x,
int y, TCOD_color_t col);
104TCODLIB_API
void TCOD_image_blit(
106 TCOD_console_t console,
113TCODLIB_API
void TCOD_image_blit_rect(
115TCODLIB_API
void TCOD_image_blit_2x(
116 const TCOD_Image* __restrict image,
TCOD_Console* __restrict dest,
int dx,
int dy,
int sx,
int sy,
int w,
int h);
117TCODLIB_API
void TCOD_image_delete(
TCOD_Image* image);
118TCODLIB_API
void TCOD_image_set_key_color(
TCOD_Image* image, TCOD_color_t key_color);
119TCODLIB_API
bool TCOD_image_is_pixel_transparent(
const TCOD_Image* image,
int x,
int y);
C types for console functions.
TCOD_Error
An enum of libtcod error codes.
Definition error.h:48
TCOD_bkgnd_flag_t
Background color blend modes.
Definition console.h:60
TCOD_Error TCOD_image_save(const TCOD_Image *image, const char *filename)
Save an image to a PNG or BMP file.
TCOD_color_t TCOD_image_get_mipmap_pixel(TCOD_Image *image, float x0, float y0, float x1, float y1)
Return a mipmapped pixel of image.
TCOD_Image * TCOD_image_from_console(const TCOD_Console *console)
Return a new image rendered from a console.
void TCOD_image_refresh_console(TCOD_Image *image, const TCOD_Console *console)
Same as TCOD_image_from_console, but with an existing image.
The libtcod namespace.
Definition bresenham.hpp:157
Miscellaneous tools needed across platforms.
A 3-channel RGB color struct.
Definition color.h:50
A libtcod console containing a grid of tiles with {ch, fg, bg} information.
Definition console.h:125