Anti-Grain Geometry Tutorial
|
Anti-Grain Geometry (AGG) is a wellknown low level graphics library that can produce very high quality 2D images. There are many projects use it as the backend engine.
This tutorial was created because AGG is somewhat difficult to use. One basically has to look at other open source projects (e.g. matplotlib) to figure out how to use some of its functionalities.
This tutorial is based on AGG-2.4, which has a permissive BSD-license. For the sake of ease of use, I also created an unofficial mirror at https://github.com/coconut2015/agg-2.4 that strips away most non-essential files.
AGG supports most operations in SVG. In fact, it operates in a very similar fashion. Thus, it is very straightfoward to create a higher level API that either generates raster images or SVG files.
For this reason, some tutorials will mention SVG and give equivalent SVG images.
This tutorial was tested on Ubuntu 18.04 LTS, but the code should be fairly portable on most other platforms.
You will need the following packages to build and run the tutorial examples.
Simply run ./make.sh
in the repo root and a debug build would be made in the debug/
directory where all tutorial executables are generated.
All source codes in this tutorial are licensed under APL 2.0.
If you like this tutorial, consider buying me a coffee.