Mercurial > MadButterfly
comparison src/redraw_man.c @ 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 |
comparison
equal
deleted
inserted
replaced
832:8ae1fb7b3104 | 833:419c7de41bfa |
---|---|
2916 CU_ASSERT(parent_2_cache[1] == 0); | 2916 CU_ASSERT(parent_2_cache[1] == 0); |
2917 CU_ASSERT(parent_2_cache[2] == -100); | 2917 CU_ASSERT(parent_2_cache[2] == -100); |
2918 CU_ASSERT(parent_2_cache[3] == 0); | 2918 CU_ASSERT(parent_2_cache[3] == 0); |
2919 CU_ASSERT(parent_2_cache[4] == 1); | 2919 CU_ASSERT(parent_2_cache[4] == 1); |
2920 CU_ASSERT(parent_2_cache[5] == -100); | 2920 CU_ASSERT(parent_2_cache[5] == -100); |
2921 | |
2922 coord2->matrix[2] = 20; | |
2923 coord2->matrix[5] = 30; | |
2924 rdman_coord_changed(rdman, coord2); | |
2925 | |
2926 /* To test if transform matrix of cached coord working */ | |
2927 parent_2_cache = ((mock_mbe_t *)_coord_get_canvas(coord2))->parent_2_cache; | |
2928 CU_ASSERT(parent_2_cache[0] == 1); | |
2929 CU_ASSERT(parent_2_cache[1] == 0); | |
2930 CU_ASSERT(parent_2_cache[2] == -120); | |
2931 CU_ASSERT(parent_2_cache[3] == 0); | |
2932 CU_ASSERT(parent_2_cache[4] == 1); | |
2933 CU_ASSERT(parent_2_cache[5] == -130); | |
2921 | 2934 |
2922 rdman_paint_free(rdman, paint); | 2935 rdman_paint_free(rdman, paint); |
2923 redraw_man_destroy(rdman); | 2936 redraw_man_destroy(rdman); |
2924 } | 2937 } |
2925 | 2938 |