# HG changeset patch # User Thinker K.F. Li # Date 1261714624 -28800 # Node ID b51ae415f459333e2401a84c09f284bcc7460e68 # Parent 5711059b9642348f872d7bfa3318b4373b86f7b3 Use coord_is_root() to indicate the root coord diff -r 5711059b9642 -r b51ae415f459 src/coord.c --- a/src/coord.c Fri Dec 25 12:11:20 2009 +0800 +++ b/src/coord.c Fri Dec 25 12:17:04 2009 +0800 @@ -63,7 +63,7 @@ * matrix as aggregated matrix. */ static void compute_transform_function(coord_t *visit) { - if(visit->parent) + if(!coord_is_root(visit)) mul_matrix(visit->parent->aggr_matrix, visit->matrix, visit->aggr_matrix); else @@ -83,7 +83,7 @@ co_aix cache_p_matrix[6]; co_aix cache_scale_x, cache_scale_y; - if(visit->parent) { + if(!coord_is_root(visit)) { p_matrix = coord_get_aggr_matrix(visit->parent); cache_scale_x = sqrtf(p_matrix[0] * p_matrix[0] + p_matrix[3] * p_matrix[3]);