changeset 533:b51ae415f459 Android_Skia

Use coord_is_root() to indicate the root coord
author Thinker K.F. Li <thinker@branda.to>
date Fri, 25 Dec 2009 12:17:04 +0800
parents 5711059b9642
children 9f2d07a60493
files src/coord.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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]);