Mercurial > MadButterfly
comparison src/redraw_man.c @ 133:4c2d83721bcc
-
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 17 Sep 2008 13:40:39 +0800 |
parents | 76ba6fd61c7d |
children | 81c03fdd94d0 |
comparison
equal
deleted
inserted
replaced
132:c65b30e2eda9 | 133:4c2d83721bcc |
---|---|
521 | 521 |
522 coord->flags &= ~COF_DIRTY; | 522 coord->flags &= ~COF_DIRTY; |
523 | 523 |
524 return OK; | 524 return OK; |
525 } | 525 } |
526 | |
527 /*! \page dirty Relationships of dirty coord, geo, and area. | |
528 * | |
529 * A coord_t instance is dirty if it's matrix had been changed. Once | |
530 * it is changed, all shapes in it's descendants would be effected. | |
531 * Shapes in descendants are dirtied. Dirty coords and dirty shapes | |
532 * should be clean. The procedure of clean for dirty coords re-compute | |
533 * aggregated matric and areas of coords. The area of a coord is a | |
534 * rectangle area where member shapes of the coord occupy. Old | |
535 * and new value of coord area are putten into dirty area list. | |
536 * | |
537 * A dirty shape means it's geo being dirty. A dirty geo is clean by | |
538 * recomputing area and transform shape it-self according aggregated | |
539 * matrix of the coord that it is a member of. Old and new value of | |
540 * geo area are also putten into dirty area list. | |
541 * | |
542 * Shapes that should be redrawed are selected by if it overlaid with any | |
543 * of dirty areas. Once it overlaid with one or more dirty areas, it | |
544 * is redrawed. | |
545 */ | |
526 | 546 |
527 static int clean_rdman_coords(redraw_man_t *rdman) { | 547 static int clean_rdman_coords(redraw_man_t *rdman) { |
528 coord_t *coord; | 548 coord_t *coord; |
529 coord_t **dirty_coords; | 549 coord_t **dirty_coords; |
530 int n_dirty_coords; | 550 int n_dirty_coords; |