00001 /*! \page archi Internal Architecture 00002 * 00003 * \image html core.png 00004 * Above graphic is relationship among major objects of MadButterfly. 00005 * \ref redraw_man_t, redraw manager, is supposed to manage graphic elements, 00006 * shapes, and decide when and who to redraw on the output screen. 00007 * 00008 * \ref shape_t is base-type for all graphic objects. It can be a path, 00009 * a text, a ellipse, ..., or an image. When the states or attributes of 00010 * an graphic 00011 * object changed, managing redraw_man_t, the one that manages the graphic 00012 * object, will be notified. The redraw_man_t will schedule a redrawing 00013 * for every 00014 * dirty objects, changed ones, and relative objects. The relative objects 00015 * are objects effected by changed ones. For example, part of a relative 00016 * object may be hidden before changing, but it is re-explored after chaning. 00017 * The explored part of the object must be redrawed. 00018 * 00019 * The shape of shape objects are vary from type to type. To simplize 00020 * the problem, we use a rectangle to model the area occupied by an object. 00021 * \ref geo_t is the one used to model the rectangle. Shape objects should 00022 * update associated \ref geo_t objects to reflect changing of them-self. 00023 * 00024 * \ref coord_t is used to model transformation in coordinate system. 00025 * A \ref coord_t is actually an transform matrix with additional 00026 * informations. \ref coord_t 00027 * objects are organized as a tree according hierachy of group tags in 00028 * a SVG file. coord_t has a member variable, called before_pmem, that 00029 * is relative position in parent coord. \ref coord_t::before_pmem stands for 00030 * "before parent member", it is an index to the list of member shapes 00031 * of parent coord. Members of a coord is shape tags they are children of 00032 * the "g" tag of the coord corresponding. \ref coord_t::before_pmem means 00033 * "g" of the coord is before the indexed member of parent. 00034 * 00035 * \image html geom_relation.png 00036 * 00037 * It is possible to have more than one coord with the same 00038 * \ref coord_t::before_pmem value and as children of a coord. It means 00039 * all children with the same coord_t::before_pmem value are all before 00040 * nth member, after (n-1)th member, and they are in order of them-self 00041 * in the children list. 00042 * 00043 * Colors or patterns used to stroke or fill shapes are described 00044 * by \ref paint_t . Every shape object has a paint, but a paint object 00045 * can be used by multiple shape objects. Once a paint is changed, all 00046 * objects that associate with the paint are dirty. They will be scheduled 00047 * by associated \ref redraw_man_t object to update graphics on 00048 * output screen. 00049 * 00050 */