Anti-Grain Geometry Tutorial
|
Using font glyphs as path objects, it is possible to use them besides drawing plain texts.
In this tutorial, drawImage function in Image - Path and Transformation is modified a bit to take on different fill rules.
And instead of directly drawing glyphs immediately, they are saved to agg::path_storage. Then we pass the generated path to drawImage function.
tutorial_font_2.cpp uses font path as clip region to draw images.
A more or less equivalent SVG is the following. SVG has limited clip path manipulation, so mask
has to be used.