This is a playground to figure out how to do a 2D graphics and event system (GES) on µ-controllers in a schmart™ way, i.e. fast on ARMs and yet efficient on AVRs.
This will focus on all layers of the graphics and event system process:
- memory access: either direct with FSMC, or (double-)buffered
- memory format: color depts, axis swapping, bit mappings
- acceleration: typical memory access operations optimized for format, like DMA2D support, fast line rendering
- renderers: using software renderer or external graphics card like FT8XX
- graphics context: transformations, context savings, etc.
- graphics api: with a small subset of SVG 2d api for resolution independence
- event system: something roughly similar to MicroUI from ESR but in C++
A full fledged GUI is not part of this playground, i.e. only GES, no Base Window System, no Window Manager, no UI Toolkit. Maybe later.
Have fun.
- C++14
- Pixel formats and colors:
- many pixel formats with respective alpha formats. See Surfaces for renderings.
- all operations from Porter and Duff's "Compositing Digital Images" implemented for all colors.
-
constexpr
pixel color constants for compile-time casting to native color. - HTML 3.2 color constants.
- Pixel Buffer wrapper class.
- Surface class for applying pixel operations.
- Geometry:
- classes for Point, Line, Size, Rectangle, Circle, Ellipse.
- collision detection for combinations (some complex cases still missing).
- unit tests for geometry classes.
- Math:
- generic,
constexpr
and precision awarefixed_point_t
class. - extensive unit tests for
fixed_point_t
.
- generic,
- Renderer:
- primitive rendering and filling.
- Line.
- Rect.
- Circle.
- Ellipse.
- rectangular clipping not using guard band clipping (where possible).
- anti-aliased rendering.
- rendering unit tests.
- primitive rendering and filling.
- Simulation in Qt:
- rendering into QImage with basic viewer.
- native Qt project compiles with Qt 5.5 and statically linked xpcc library.
- working unit test harness from xpcc
- benchmarks of rendering
- optimization rendering
Example rendering in simulator showing RGB332
color format with clipped primitives: