Advanced 2D Graphics

For handling complex 2D vectorial pictures there is a class named VectorImage. A VectorImage consists of a series graphical primitives with complex attributes like lines and splines with custom defined line type patterns, regions with custom defined fill patterns and so on. You can add, remove these primitives and query some simple properties like bounding box. For a thorough query you can iterate through VectorImages with ConstVectorImageIterator or you can use the VectorImageIterator to modify the primitives to some extent. You can define an arbitrary order of the iteration of the elements by defining the sorting relation of the iteration. Since there is no functions for VectorImage persistence, you can get and set its internals to implement Read/Write. If you want to visualize the VectorImage, you can call its Draw method. This method requires supplying a draw context which has a set of attributes and callbacks. These callbacks is relatively straightforward to implement and the Draw method will disassemble the VectorImage for them: for implementing them you shouldn’t know anything about symbol fills or etc.