Mercurial > MadButterfly
comparison src/redraw_man.c @ 747:d2f2ed27b84d
Separate GEF_NOT_SHOWED and GEF_HIDDEN flags.
GEF_HIDDEN mark a geo (shape) can not be showed, GEF_NOT_SHOWED is
implied by GEF_HIDDEN or one of ancesters that is hidden. Redraw
manager use GEF_NOT_SHOWED to determine who is not showed, actually.
GEF_NOT_SHOWED is flaged when clean_shape().
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 25 Aug 2010 18:22:32 +0800 |
parents | f42419c08a65 |
children | 7c73fbc8d700 |
comparison
equal
deleted
inserted
replaced
746:1dbc74a14199 | 747:d2f2ed27b84d |
---|---|
1224 break; | 1224 break; |
1225 #endif /* UNITTEST */ | 1225 #endif /* UNITTEST */ |
1226 } | 1226 } |
1227 shape->geo->flags &= ~GEF_DIRTY; | 1227 shape->geo->flags &= ~GEF_DIRTY; |
1228 | 1228 |
1229 if(is_coord_subtree_hidden(shape->coord)) | 1229 if(sh_get_flags(shape, GEF_HIDDEN) || |
1230 sh_hide(shape); | 1230 is_coord_subtree_hidden(shape->coord)) |
1231 sh_set_flags(shape, GEF_NOT_SHOWED); | |
1231 else | 1232 else |
1232 sh_show(shape); | 1233 sh_clear_flags(shape, GEF_NOT_SHOWED); |
1233 } | 1234 } |
1234 | 1235 |
1235 /*! \brief Setup canvas_info for the coord. | 1236 /*! \brief Setup canvas_info for the coord. |
1236 * | 1237 * |
1237 * Own a canvas or inherit it from parent. | 1238 * Own a canvas or inherit it from parent. |
2240 dirty |= r; | 2241 dirty |= r; |
2241 } | 2242 } |
2242 child = NEXT_CHILD(child); | 2243 child = NEXT_CHILD(child); |
2243 } else { | 2244 } else { |
2244 ASSERT(member != NULL); | 2245 ASSERT(member != NULL); |
2245 if((!(member->flags & GEF_HIDDEN)) && | 2246 if((!(member->flags & GEF_NOT_SHOWED)) && |
2246 is_geo_in_areas(member, n_areas, areas)) { | 2247 is_geo_in_areas(member, n_areas, areas)) { |
2247 draw_shape(rdman, canvas, member->shape); | 2248 draw_shape(rdman, canvas, member->shape); |
2248 dirty = 1; | 2249 dirty = 1; |
2249 } | 2250 } |
2250 | 2251 |