Function TCOD_context_screen_capture_alloc

Function Documentation

TCOD_ColorRGBA *TCOD_context_screen_capture_alloc(struct TCOD_Context *context, int *width, int *height)

Allocate and return a screen capture.

The returned array must be freed with free().

New in version 1.22.

Parameters
  • context – A non-NULL TCOD_Context object.

  • width – Pointer to fill with the allocated image width.

  • height – Pointer to fill with the allocated image height.

Returns

An allocated array of RGBA pixels which must be manually freed.