# HG changeset patch # User Thinker K.F. Li # Date 1218375162 -28800 # Node ID 1ca417f741f1e04ea46e5e0c6b83963b5c4f9162 # Parent ab028c9f0930f8fecdcfa857564916792b0b4ed5 - diff -r ab028c9f0930 -r 1ca417f741f1 src/X_main.c --- a/src/X_main.c Sun Aug 10 20:25:14 2008 +0800 +++ b/src/X_main.c Sun Aug 10 21:32:42 2008 +0800 @@ -205,6 +205,7 @@ tman = mb_tman_new(); if(tman) { + /* Prepare an animation program. */ progm = mb_progm_new(10, &rdman); MB_TIMEVAL_SET(&start, 0, 0); @@ -232,6 +233,7 @@ act = mb_chgcolor_new(1, 0, 0, 0.5, fill2, word); act = mb_visibility_new(VIS_VISIBLE, coord3, word); + /* Start playing the program. */ gettimeofday(&tv, NULL); MB_TIMEVAL_SET(&mbtv, tv.tv_sec, tv.tv_usec); mb_progm_start(progm, tman, &mbtv); diff -r ab028c9f0930 -r 1ca417f741f1 src/mb_types.h --- a/src/mb_types.h Sun Aug 10 20:25:14 2008 +0800 +++ b/src/mb_types.h Sun Aug 10 21:32:42 2008 +0800 @@ -11,6 +11,14 @@ typedef struct _shnode shnode_t; typedef struct _paint paint_t; +/*! \brief Base of paint types. + * + * Paints should be freed by users by calling paint_t::free() of + * the paint. + * + * \todo move member functions to a seperate structure and setup a + * singleton fro each paint type. + */ struct _paint { void (*prepare)(paint_t *paint, cairo_t *cr); void (*free)(paint_t *paint); diff -r ab028c9f0930 -r 1ca417f741f1 src/paint.c --- a/src/paint.c Sun Aug 10 20:25:14 2008 +0800 +++ b/src/paint.c Sun Aug 10 21:32:42 2008 +0800 @@ -135,6 +135,12 @@ return (paint_t *)linear; } +/*! \brief Setup color stop for a linear radient paint. + * + * stops should be managed by users of the function. It should be + * available before the paint being freed or changed to another + * array of stops. + */ grad_stop_t *paint_linear_stops(paint_t *paint, int n_stops, grad_stop_t *stops) { @@ -216,6 +222,12 @@ return (paint_t *)radial; } +/*! \brief Setup color stop for a radial radient paint. + * + * stops should be managed by users of the function. It should be + * available before the paint being freed or changed to another + * array of stops. + */ grad_stop_t *paint_radial_stops(paint_t *paint, int n_stops, grad_stop_t *stops) { diff -r ab028c9f0930 -r 1ca417f741f1 src/redraw_man.c --- a/src/redraw_man.c Sun Aug 10 20:25:14 2008 +0800 +++ b/src/redraw_man.c Sun Aug 10 21:32:42 2008 +0800 @@ -231,8 +231,8 @@ STAILQ_INS_TAIL(rdman->all_geos, geo_t, next, geo); rdman->n_geos++; + /*! \todo remove order number. */ #ifdef GEO_ORDER - /* TODO: remove order number. */ geo->order = ++rdman->next_geo_order; if(geo->order == 0) { next_order = 0; @@ -257,7 +257,7 @@ /*! \brief Remove a shape object from redraw manager. * - * TODO: redraw shape objects that overlaid with removed one. + * \todo redraw shape objects that overlaid with removed one. */ int rdman_remove_shape(redraw_man_t *rdman, shape_t *shape) { STAILQ_REMOVE(rdman->all_geos, geo_t, next, shape->geo); @@ -614,7 +614,7 @@ #ifndef UNITTEST static void clean_canvas(cairo_t *cr) { - /* TODO: clean to background color. */ + /*! \todo clean to background color. */ cairo_set_source_rgb(cr, 0, 0, 0); cairo_paint(cr); } diff -r ab028c9f0930 -r 1ca417f741f1 src/shape_path.c --- a/src/shape_path.c Sun Aug 10 20:25:14 2008 +0800 +++ b/src/shape_path.c Sun Aug 10 21:32:42 2008 +0800 @@ -323,7 +323,7 @@ case 'H': case 'v': case 'V': - /* TODO: implement h, H, v, V comamnds for path. */ + /*! \todo implement h, H, v, V comamnds for path. */ return ERR; case 'z': case 'Z': @@ -387,7 +387,7 @@ /*! \brief Transform a path from user space to device space. * - * TODO: associate coord_t with shape objects and transform them + * \todo associate coord_t with shape objects and transform them * automatically. */ void sh_path_transform(shape_t *shape) { diff -r ab028c9f0930 -r 1ca417f741f1 src/shape_text.c --- a/src/shape_text.c Sun Aug 10 20:25:14 2008 +0800 +++ b/src/shape_text.c Sun Aug 10 21:32:42 2008 +0800 @@ -109,7 +109,7 @@ coord_trans_pos(shape->coord, &x, &y); r = get_extents(text, &extents); if(r != OK) - /* TODO: announce error. change return type? */ + /*! \todo announce error. change return type? */ return; text->d_x = x;