Mercurial > MadButterfly
diff src/coord.c @ 31:da770188a44d
resize font size for changige of coord.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Tue, 05 Aug 2008 16:38:04 +0800 |
parents | 41f0907b27ac |
children | 9f4fc9ecfd1f |
line wrap: on
line diff
--- a/src/coord.c Tue Aug 05 12:40:45 2008 +0800 +++ b/src/coord.c Tue Aug 05 16:38:04 2008 +0800 @@ -4,6 +4,7 @@ */ #include <stdio.h> #include <string.h> +#include <math.h> #include "mb_types.h" @@ -110,6 +111,15 @@ *y = ny; } +co_aix coord_trans_size(coord_t *co, co_aix sz) { + co_aix x, y; + + x = MUL(co->aggr_matrix[0], sz); + y = MUL(co->aggr_matrix[3], sz); + + return sqrt(x * x + y * y); +} + coord_t *preorder_coord_subtree(coord_t *root, coord_t *last) { coord_t *next;