Mercurial > MadButterfly
diff src/shape_path.c @ 73:9ab15ebc9061
Observer for mouse events
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Mon, 18 Aug 2008 01:59:26 +0800 |
parents | 1ca417f741f1 |
children | 7d0580f89468 |
line wrap: on
line diff
--- a/src/shape_path.c Wed Aug 13 09:25:57 2008 +0800 +++ b/src/shape_path.c Mon Aug 18 01:59:26 2008 +0800 @@ -37,7 +37,7 @@ #define OK 0 #define ERR -1 -void sh_path_free(shape_t *shape) { +static void sh_path_free(shape_t *shape) { sh_path_t *path = (sh_path_t *)shape; if(path->user_data) free(path->user_data); @@ -382,6 +382,8 @@ } memcpy(path->dev_data, path->user_data, cmd_cnt); + path->shape.free = sh_path_free; + return (shape_t *)path; } @@ -592,6 +594,7 @@ CU_ASSERT(strcmp(path->user_data, "MLCLZ") == 0); CU_ASSERT(strcmp(path->dev_data, "MLCLZ") == 0); + geo_init(&geo); path->shape.geo = &geo; geo.shape = (shape_t *)path;