Skip to content

Latest commit

 

History

History
79 lines (52 loc) · 2.7 KB

README.md

File metadata and controls

79 lines (52 loc) · 2.7 KB

PAX graphics documentation

The PAX graphics stack is being developed for the MCH2022 badge. 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.

Overview

For C developers

PAX is built on a C API which exposes 2D primitives and some simple compound shapes. It features matrix transformations, a clipping rectangle, highly accurate rendering and more.

Overview

From the C API overview:

Build system

In order to support multiple targets and platforms, the build system for PAX has grown somewhat complex.

Build system: for ESP32

Similarly, PAX can be used directly as an ESP-IDF component when placed in your components folder.

ESP32 is an officially supported platform. For other supported platforms, see this link.

Build system: for Pi Pico

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:

1. Clone PAX:

Just put in your project folder, next to your CMakeLists.txt.

git clone https://github.com/robotman2412/pax-graphics

2. Link it to your project:

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 ${CMAKE_CURRENT_LIST_DIR}/pax-graphics/build/pax_graphics)

3. Profit!

Raspberry Pi Pico support is currently in beta. For supported platforms, see this link.