Mercurial > MadButterfly
changeset 20:74d3d5dc9aaa
rename XXX_draw() to XXX_fill()
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sat, 02 Aug 2008 15:46:26 +0800 |
parents | cf6d65398619 |
children | 83d24300a992 |
files | src/X_main.c src/redraw_man.c src/shape_path.c src/shapes.h |
diffstat | 4 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/X_main.c Sat Aug 02 15:38:54 2008 +0800 +++ b/src/X_main.c Sat Aug 02 15:46:26 2008 +0800 @@ -36,7 +36,7 @@ rdman_paint_fill(&rdman, fill2, path2); coord2->matrix[0] = -0.8; coord2->matrix[1] = 0; - coord2->matrix[2] = 220; + coord2->matrix[2] = 180; coord2->matrix[4] = 0.8; coord2->matrix[5] = 20; rdman_coord_changed(&rdman, coord1);
--- a/src/redraw_man.c Sat Aug 02 15:38:54 2008 +0800 +++ b/src/redraw_man.c Sat Aug 02 15:46:26 2008 +0800 @@ -17,7 +17,7 @@ typedef struct _sh_dummy sh_dummy_t; extern void sh_dummy_transform(shape_t *shape); -extern void sh_dummy_draw(shape_t *, cairo_t *); +extern void sh_dummy_fill(shape_t *, cairo_t *); #endif /* UNITTEST */ /*! \brief Sort a list of element by a unsigned integer. @@ -460,7 +460,7 @@ * ============================================================ */ -static void draw_shape(redraw_man_t *rdman, shape_t *shape) { +static void fill_shape(redraw_man_t *rdman, shape_t *shape) { paint_t *fill; fill = shape->fill; @@ -468,11 +468,11 @@ fill->prepare(fill, rdman->cr); switch(shape->sh_type) { case SHT_PATH: - sh_path_draw(shape, rdman->cr); + sh_path_fill(shape, rdman->cr); break; #ifdef UNITTEST default: - sh_dummy_draw(shape, rdman->cr); + sh_dummy_fill(shape, rdman->cr); break; #endif /* UNITTEST */ } @@ -520,7 +520,7 @@ } #endif /* UNITTEST */ -static void draw_shapes_in_areas(redraw_man_t *rdman, +static void fill_shapes_in_areas(redraw_man_t *rdman, int n_areas, area_t **areas) { geo_t *visit_geo; @@ -533,7 +533,7 @@ clean_shape(visit_geo->shape); for(i = 0; i < n_areas; i++) { if(is_overlay(visit_geo->cur_area, areas[i])) { - draw_shape(rdman, visit_geo->shape); + fill_shape(rdman, visit_geo->shape); break; } } @@ -603,7 +603,7 @@ dirty_areas = rdman->dirty_areas; if(n_dirty_areas > 0) { make_clip(rdman, n_dirty_areas, dirty_areas); - draw_shapes_in_areas(rdman, n_dirty_areas, dirty_areas); + fill_shapes_in_areas(rdman, n_dirty_areas, dirty_areas); rdman->n_dirty_areas = 0; reset_clip(rdman); } @@ -623,7 +623,7 @@ geo = STAILQ_NEXT(geo_t, next, geo)) { if(geo->flags & GEF_DIRTY) clean_shape(geo->shape); - draw_shape(rdman, geo->shape); + fill_shape(rdman, geo->shape); } return OK; @@ -774,7 +774,7 @@ } } -void sh_dummy_draw(shape_t *shape, cairo_t *cr) { +void sh_dummy_fill(shape_t *shape, cairo_t *cr) { sh_dummy_t *dummy; dummy = (sh_dummy_t *)shape;
--- a/src/shape_path.c Sat Aug 02 15:38:54 2008 +0800 +++ b/src/shape_path.c Sat Aug 02 15:46:26 2008 +0800 @@ -417,7 +417,7 @@ } } -void sh_path_draw(shape_t *shape, cairo_t *cr) { +void sh_path_fill(shape_t *shape, cairo_t *cr) { sh_path_t *path; int cmd_len; char *cmds, cmd;
--- a/src/shapes.h Sat Aug 02 15:38:54 2008 +0800 +++ b/src/shapes.h Sat Aug 02 15:46:26 2008 +0800 @@ -7,6 +7,6 @@ extern void sh_path_free(shape_t *path); extern shape_t *sh_path_new(char *data); extern void sh_path_transform(shape_t *shape); -extern void sh_path_draw(shape_t *shape, cairo_t *cr); +extern void sh_path_fill(shape_t *shape, cairo_t *cr); #endif /* __SHAPES_H_ */