Mercurial > MadButterfly
view src/subtree_free.c @ 269:c96f38ad4bb6
Fix mis-behavior of translate_path_data() on arc.
- Arc in a path in svg2code_ex is not showed.
- translate_path_data() in svg2code.py was modified for calling
binary version new method for path shape.
- rdman_shape_path_new_from_binary()
- Code to translate path data does not handle arc in a right way.
- Copy calc_center_and_x_aix() from shape_path.c to svg2code.py and
change name _calc_ellipse_of_arc()
- _calc_ellipse_of_arc() handle arc data for translate_path_data()
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 25 Jan 2009 00:20:34 +0800 |
parents | 45d9a1e2764d |
children | 586e50f82c1f |
line wrap: on
line source
#include "mb_redraw_man.h" #include "mb_animate.h" struct _subtree_free { mb_action_t action; coord_t *coord; }; typedef struct _subtree_free subtree_free_t; void mb_subtree_free_start(mb_action_t *action, const mb_timeval_t *now, const mb_timeval_t *playing_time, redraw_man_t *rdman) { subtree_free_t *sfree = (subtree_free_t *)action; rdman_coord_subtree_free(rdman, sfree->coord); } void mb_subtree_free_step(mb_action_t *act, const mb_timeval_t *now, redraw_man_t *rdman) { } void mb_subtree_free_stop(mb_action_t *act, const mb_timeval_t *now, redraw_man_t *rdman) { } void mb_subtree_free_free(mb_action_t *act) { free(act); } mb_action_t *mb_subtree_free_new(coord_t *coord, mb_word_t *word) { subtree_free_t *sfree; sfree = (subtree_free_t *)malloc(sizeof(subtree_free_t)); if(sfree == NULL) return NULL; sfree->action.start = mb_subtree_free_start; sfree->action.step = mb_subtree_free_step; sfree->action.stop = mb_subtree_free_stop; sfree->action.free = mb_subtree_free_free; sfree->coord = coord; mb_word_add_action(word, (mb_action_t *)sfree); return (mb_action_t *)sfree; }