Skip to content
/ stilou Public

Simple graphics library for drawing to pixels in C

Notifications You must be signed in to change notification settings

dfl0/stilou

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stilou.h

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.

Usage

To use this library, just add stilou.h to your project and #include it.

Demo

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.

Build and Run the Demo

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 demo

Run it with:

$ ./demo

demo

Note that the above is a GIF, hence the limited frame rate.

About

Simple graphics library for drawing to pixels in C

Resources

Stars

Watchers

Forks