comparison src/graph_engine_skia.cpp @ 483:d984a6672be7 Android_Skia

Fix bug of translate between co_aix and SkScalar. It is a misunderstanding of SkScalar. We change the code to fix the issue.
author Thinker K.F. Li <thinker@branda.to>
date Wed, 18 Nov 2009 15:44:08 +0800
parents d38aca825822
children 9e36e06fcc18
comparison
equal deleted inserted replaced
482:d38aca825822 483:d984a6672be7
96 #define ASSERT(x) 96 #define ASSERT(x)
97 #endif 97 #endif
98 98
99 #define PI 3.1415926535897931 99 #define PI 3.1415926535897931
100 100
101 #define CO_AIX_2_SKSCALAR(a) ((a) * 65536) 101 #define CO_AIX_2_SKSCALAR(a) ((SkScalar)a)
102 #define SKSCALAR_2_CO_AIX(a) ((co_aix)(a) / 65536) 102 #define SKSCALAR_2_CO_AIX(a) ((co_aix)(a))
103 #define MB_MATRIX_2_SKMATRIX(sk, mb) { \ 103 #define MB_MATRIX_2_SKMATRIX(sk, mb) { \
104 (sk).setScaleX(CO_AIX_2_SKSCALAR((mb)[0])); \ 104 (sk).setScaleX(CO_AIX_2_SKSCALAR((mb)[0])); \
105 (sk).setSkewX(CO_AIX_2_SKSCALAR((mb)[1])); \ 105 (sk).setSkewX(CO_AIX_2_SKSCALAR((mb)[1])); \
106 (sk).setTranslateX(CO_AIX_2_SKSCALAR((mb)[2])); \ 106 (sk).setTranslateX(CO_AIX_2_SKSCALAR((mb)[2])); \
107 (sk).setSkewY(CO_AIX_2_SKSCALAR((mb)[3])); \ 107 (sk).setSkewY(CO_AIX_2_SKSCALAR((mb)[3])); \