1h1. Introduction
2
3This manual focuses on the lib2geom computational geometry framework.
4The main goal of this framework is the eventual replacement of
5Inkscape's multiple and shoddy geometry frameworks. As with any decent
6module or lib, 2geom is designed to achieve the desired functionality
7while maintaining a generality encouraging usage within other
8applications.  The focus on robust, accurate algorithms, as well as
9utilization of newer and better representations makes the lib
10very attractive for many applications.
11
12h2. Design Considerations
13
142Geom is written with a functional programming style in mind.
15Generally data structures are considered immutable and rather than
16assignment we use labeling.  However, C++ can become unwieldy if
17this is taken to extreme and so a certain amount of pragmatism is
18used in practice.  In particular, usability is not forgotten in the
19mires of functional zeal.
20
21The code relies strongly on the type system and uses some of the more
22'tricky' elements of C++ to make the code more elegant and 'correct'.
23Despite this, the intended use of 2Geom is a serious vector graphics
24application. In such domains, performance is still used as a quality
25metric, and as such we consider inefficiency to be a bug, and have
26traded elegance for efficiency where it matters.
27
28In general the data structures used in 2Geom are relatively 'flat'
29and require little from the memory management.  Currently most data
30structures are built on standard STL headers, and new and delete are
31used sparingly.  It is intended for 2Geom to be fully compatible with
32Boehm garbage collector though this has not yet been tested.
33
34h2. Toy-Based Development
35
36We have managed to come up with a method of library development
37which is perfect for geometry - the development of toys exemplifying
38a feature while the feature is perfected.  This has somewhat subsumed
39the role of tests, and provides immediate motivation/reward for work.
40
41!media/gear.png!
42