changeset 833:419c7de41bfa

Make sure transform matrix of a cached coord working
author Thinker K.F. Li <thinker@codemud.net>
date Fri, 17 Sep 2010 12:21:35 +0800
parents 8ae1fb7b3104
children 9f305d895e8f
files src/redraw_man.c
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/redraw_man.c	Fri Sep 17 12:21:35 2010 +0800
+++ b/src/redraw_man.c	Fri Sep 17 12:21:35 2010 +0800
@@ -2918,6 +2918,19 @@
     CU_ASSERT(parent_2_cache[3] == 0);
     CU_ASSERT(parent_2_cache[4] == 1);
     CU_ASSERT(parent_2_cache[5] == -100);
+
+    coord2->matrix[2] = 20;
+    coord2->matrix[5] = 30;
+    rdman_coord_changed(rdman, coord2);
+    
+    /* To test if transform matrix of cached coord working */
+    parent_2_cache = ((mock_mbe_t *)_coord_get_canvas(coord2))->parent_2_cache;
+    CU_ASSERT(parent_2_cache[0] == 1);
+    CU_ASSERT(parent_2_cache[1] == 0);
+    CU_ASSERT(parent_2_cache[2] == -120);
+    CU_ASSERT(parent_2_cache[3] == 0);
+    CU_ASSERT(parent_2_cache[4] == 1);
+    CU_ASSERT(parent_2_cache[5] == -130);    
     
     rdman_paint_free(rdman, paint);
     redraw_man_destroy(rdman);