comparison 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
comparison
equal deleted inserted replaced
30:e06a4a667ce2 31:da770188a44d
2 * \file 2 * \file
3 * This file implements coordination transforming for containers. 3 * This file implements coordination transforming for containers.
4 */ 4 */
5 #include <stdio.h> 5 #include <stdio.h>
6 #include <string.h> 6 #include <string.h>
7 #include <math.h>
7 #include "mb_types.h" 8 #include "mb_types.h"
8 9
9 10
10 #define ASSERT(x) 11 #define ASSERT(x)
11 12
108 co->aggr_matrix[5]); 109 co->aggr_matrix[5]);
109 *x = nx; 110 *x = nx;
110 *y = ny; 111 *y = ny;
111 } 112 }
112 113
114 co_aix coord_trans_size(coord_t *co, co_aix sz) {
115 co_aix x, y;
116
117 x = MUL(co->aggr_matrix[0], sz);
118 y = MUL(co->aggr_matrix[3], sz);
119
120 return sqrt(x * x + y * y);
121 }
122
113 coord_t *preorder_coord_subtree(coord_t *root, coord_t *last) { 123 coord_t *preorder_coord_subtree(coord_t *root, coord_t *last) {
114 coord_t *next; 124 coord_t *next;
115 125
116 ASSERT(last == NULL); 126 ASSERT(last == NULL);
117 127