Mercurial > MadButterfly
comparison src/redraw_man.c @ 58:1ca417f741f1
-
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 10 Aug 2008 21:32:42 +0800 |
parents | ab028c9f0930 |
children | 9ab15ebc9061 |
comparison
equal
deleted
inserted
replaced
57:ab028c9f0930 | 58:1ca417f741f1 |
---|---|
229 | 229 |
230 sh_attach_geo(shape, geo); | 230 sh_attach_geo(shape, geo); |
231 STAILQ_INS_TAIL(rdman->all_geos, geo_t, next, geo); | 231 STAILQ_INS_TAIL(rdman->all_geos, geo_t, next, geo); |
232 rdman->n_geos++; | 232 rdman->n_geos++; |
233 | 233 |
234 /*! \todo remove order number. */ | |
234 #ifdef GEO_ORDER | 235 #ifdef GEO_ORDER |
235 /* TODO: remove order number. */ | |
236 geo->order = ++rdman->next_geo_order; | 236 geo->order = ++rdman->next_geo_order; |
237 if(geo->order == 0) { | 237 if(geo->order == 0) { |
238 next_order = 0; | 238 next_order = 0; |
239 for(visit = STAILQ_HEAD(rdman->all_geos); | 239 for(visit = STAILQ_HEAD(rdman->all_geos); |
240 visit != NULL; | 240 visit != NULL; |
255 return OK; | 255 return OK; |
256 } | 256 } |
257 | 257 |
258 /*! \brief Remove a shape object from redraw manager. | 258 /*! \brief Remove a shape object from redraw manager. |
259 * | 259 * |
260 * TODO: redraw shape objects that overlaid with removed one. | 260 * \todo redraw shape objects that overlaid with removed one. |
261 */ | 261 */ |
262 int rdman_remove_shape(redraw_man_t *rdman, shape_t *shape) { | 262 int rdman_remove_shape(redraw_man_t *rdman, shape_t *shape) { |
263 STAILQ_REMOVE(rdman->all_geos, geo_t, next, shape->geo); | 263 STAILQ_REMOVE(rdman->all_geos, geo_t, next, shape->geo); |
264 elmpool_elm_free(rdman->geo_pool, shape->geo); | 264 elmpool_elm_free(rdman->geo_pool, shape->geo); |
265 sh_detach_geo(shape); | 265 sh_detach_geo(shape); |
612 } | 612 } |
613 } | 613 } |
614 | 614 |
615 #ifndef UNITTEST | 615 #ifndef UNITTEST |
616 static void clean_canvas(cairo_t *cr) { | 616 static void clean_canvas(cairo_t *cr) { |
617 /* TODO: clean to background color. */ | 617 /*! \todo clean to background color. */ |
618 cairo_set_source_rgb(cr, 0, 0, 0); | 618 cairo_set_source_rgb(cr, 0, 0, 0); |
619 cairo_paint(cr); | 619 cairo_paint(cr); |
620 } | 620 } |
621 | 621 |
622 static void make_clip(cairo_t *cr, int n_dirty_areas, | 622 static void make_clip(cairo_t *cr, int n_dirty_areas, |