The PAX graphics stack is the official graphics library for Badge.team badges since MCH2022. It's goal is to allow anyone to, in C, use a powerful list of drawing features with good optimisation.
This library is the successor of the revised graphics API for the old badge.team firmware.
For supported platforms, see this link.
PAX exposes a simple C API which exposes 2D primitives and some simple compound shapes. It features matrix transformations, a clipping rectangle, highly accurate rendering and more.
From the Core API overview:
In order to support multiple targets and platforms, the build system for PAX has grown somewhat complex.
Similarly, PAX can be used directly as an ESP-IDF component when placed in your components folder.
ESP-IDF is an officially supported platform. For other supported platforms, see this link.
Due to the more "raw CMake" nature of the Pico SDK, it's slightly more complicated.
TL;DR: Clone it and link it with add_subdirectory
and target_link_libraries
.
But an actual explanation is better, so:
Just put in your project folder, next to your CMakeLists.txt
.
git clone https://github.com/robotman2412/pax-graphics
Add to your CMakeLists.txt
, after target_include_directories
:
# This tells CMake to build PAX for us.
add_subdirectory(pax-graphics)
# This tells CMake we would like to use PAX as a library.
target_link_libraries(your_project_name pax_gfx)
Raspberry Pi Pico support is currently in beta. For supported platforms, see this link.