annotate dox/arch.h @ 1229:cc55f3de9c0b

Revert #027187a21117 before applying patches for refactoring. - #027187a21117 is just a lot of print messages, it make patches rejected. - The following patches would change a lot, the messages may mean nothing. - If someone still need #027187a21117, you can pick it back and apply it again.
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 10 Jan 2011 11:45:04 +0800
parents e89512d6fa0a
children
rev   line source
111
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
1 /*! \page archi Internal Architecture
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
2 *
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
3 * \image html core.png
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
4 * Above graphic is relationship among major objects of MadButterfly.
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
5 * \ref redraw_man_t, redraw manager, is supposed to manage graphic elements,
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
6 * shapes, and decide when and who to redraw on the output screen.
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
7 *
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
8 * \ref shape_t is base-type for all graphic objects. It can be a path,
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
9 * a text, a ellipse, ..., or an image. When the states or attributes of
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
10 * an graphic
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
11 * object changed, managing redraw_man_t, the one that manages the graphic
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
12 * object, will be notified. The redraw_man_t will schedule a redrawing
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
13 * for every
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
14 * dirty objects, changed ones, and relative objects. The relative objects
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
15 * are objects effected by changed ones. For example, part of a relative
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
16 * object may be hidden before changing, but it is re-explored after chaning.
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
17 * The explored part of the object must be redrawed.
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
18 *
141
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
19 * The shape of shape objects are vary from type to type. To simplize
111
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
20 * the problem, we use a rectangle to model the area occupied by an object.
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
21 * \ref geo_t is the one used to model the rectangle. Shape objects should
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
22 * update associated \ref geo_t objects to reflect changing of them-self.
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
23 *
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
24 * \ref coord_t is used to model transformation in coordinate system.
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
25 * A \ref coord_t is actually an transform matrix with additional
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
26 * informations. \ref coord_t
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
27 * objects are organized as a tree according hierachy of group tags in
141
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
28 * a SVG file. coord_t has a member variable, called before_pmem, that
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
29 * is relative position in parent coord. \ref coord_t::before_pmem stands for
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
30 * "before parent member", it is an index to the list of member shapes
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
31 * of parent coord. Members of a coord is shape tags they are children of
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
32 * the "g" tag of the coord corresponding. \ref coord_t::before_pmem means
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
33 * "g" of the coord is before the indexed member of parent.
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
34 *
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
35 * \image html geom_relation.png
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
36 *
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
37 * It is possible to have more than one coord with the same
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
38 * \ref coord_t::before_pmem value and as children of a coord. It means
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
39 * all children with the same coord_t::before_pmem value are all before
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
40 * nth member, after (n-1)th member, and they are in order of them-self
e89512d6fa0a Change doxygen comment to reflect changes of relation-ship.
Thinker K.F. Li <thinker@branda.to>
parents: 111
diff changeset
41 * in the children list.
111
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
42 *
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
43 * Colors or patterns used to stroke or fill shapes are described
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
44 * by \ref paint_t . Every shape object has a paint, but a paint object
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
45 * can be used by multiple shape objects. Once a paint is changed, all
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
46 * objects that associate with the paint are dirty. They will be scheduled
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
47 * by associated \ref redraw_man_t object to update graphics on
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
48 * output screen.
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
49 *
8feb89b19619 More doxy
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
50 */