A single-file, dependency-free graphics library for drawing directly to a pre-allocated pixel buffer in C.
This library provides an easy way to render primitive shapes and (potentially) images directly into some memory, supporting flexible output such as saving the pixels to an image file, rendering them in an SDL window, displaying them in the terminal, etc.
To use this library, just add stilou.h to your project and
#include it.
A simple demo is provided in demo.c --- it initializes a canvas,
fills it with a color, and displays it in a window using SDL.
Important
This demo uses SDL2 to render the pixels in a window, so make sure it is installed on your system.
Build the demo with:
$ make demoRun it with:
$ ./demoNote that the above is a GIF, hence the limited frame rate.