Mercurial > MadButterfly
changeset 133:4c2d83721bcc
-
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 17 Sep 2008 13:40:39 +0800 |
parents | c65b30e2eda9 |
children | 4d2e28188460 |
files | src/redraw_man.c src/redraw_man.h |
diffstat | 2 files changed, 26 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/redraw_man.c Wed Sep 17 13:40:32 2008 +0800 +++ b/src/redraw_man.c Wed Sep 17 13:40:39 2008 +0800 @@ -524,6 +524,26 @@ return OK; } +/*! \page dirty Relationships of dirty coord, geo, and area. + * + * A coord_t instance is dirty if it's matrix had been changed. Once + * it is changed, all shapes in it's descendants would be effected. + * Shapes in descendants are dirtied. Dirty coords and dirty shapes + * should be clean. The procedure of clean for dirty coords re-compute + * aggregated matric and areas of coords. The area of a coord is a + * rectangle area where member shapes of the coord occupy. Old + * and new value of coord area are putten into dirty area list. + * + * A dirty shape means it's geo being dirty. A dirty geo is clean by + * recomputing area and transform shape it-self according aggregated + * matrix of the coord that it is a member of. Old and new value of + * geo area are also putten into dirty area list. + * + * Shapes that should be redrawed are selected by if it overlaid with any + * of dirty areas. Once it overlaid with one or more dirty areas, it + * is redrawed. + */ + static int clean_rdman_coords(redraw_man_t *rdman) { coord_t *coord; coord_t **dirty_coords;
--- a/src/redraw_man.h Wed Sep 17 13:40:32 2008 +0800 +++ b/src/redraw_man.h Wed Sep 17 13:40:39 2008 +0800 @@ -40,19 +40,21 @@ int max_dirty_coords; int n_dirty_coords; - coord_t **dirty_coords; + coord_t **dirty_coords; /*!< coordinates their transform + * matric are chagned. + */ int max_dirty_geos; int n_dirty_geos; - geo_t **dirty_geos; + geo_t **dirty_geos; /*!< geometries that need re-computed */ int max_dirty_areas; int n_dirty_areas; - area_t **dirty_areas; + area_t **dirty_areas; /*!< \brief are areas need to redraw. */ int max_gen_geos; int n_gen_geos; - geo_t **gen_geos; /* general geo list */ + geo_t **gen_geos; /* general geo list (for temporary store) */ cairo_t *cr; cairo_t *backend;