Anti-Grain Geometry Tutorial
Line Drawing - Curved Line

In order for agg::path_cmd_curve3, agg::path_cmd_curve4 etc to take effect, it is necessary to add an extra step that compute the actual curve path using agg::conv_curve. Then use this curve path to generate the stroke path.

There are a number of advantages with this approach.

  • One does not have to pay the cost of generating curves when there are no curves in the path.
  • It is easy to add / combine path generators depending on the need.

Example

tutorial_linedrawing_2.cpp generates an image containing a caret and a dome.

tutorial_linedrawing_2.png

An equivalent SVG is

tutorial_linedrawing_2.svg