I have recently been working on many small projects where I needed to draw bitmap art in the terminal. I quickly realized that most of the fonctionality I implemented in those projects could be incorporated in a single library that could be maintained easily. Here it is. I hope this can be useful to someone else. Feel free to use the code in your own project and if you encounter any issues, either open an issue in the corresponding session or change the code to your heart content and open a PR so that everyone can benefit.
A rendering of the mandelbrot set with Teye (see the corresponding test)
Visuals of a Chip8 emulator that I am currently working on, with Teye as the rendering engine
0.3.1
Refactored the API to give more control to the user
- The enum
DrawingModewas renamed toScalingModefor more clarity - Add a collection of
blitfunctions to give a more fine grained control to the drawing process - The enum
SampleModewas created in prevision for an upcoming feature - The function
TEYE_get_framebufferwas added to the public API. This function allows the user to write directly to the framebuffers or read from them.
- Give more control to the user (restrict rendering region, not clear screen witout user permission)
Please read here for information on how to help the project.
See LICENCE for more information.
- src/, include/ - core framebuffer and terminal render code (TEYE_* API)
- tests/ - ontains small programs used to test the features
- C compiler (gcc/clang)
- POSIX-compatible terminal (Linux, macOS). Windows may work but is untested.
Use Make:
make
sudo make installwill build the library and install it in /usr/local/.
To build the tests:
make testsMore about the build system here
Feel free to see the examples in the tests/ sections. They are kept in sync with the library.
