changeset 514:663d361eb3b8 Android_Skia

Set perspective of 3x3 matrix when translate MB matrix to SkMatrix. perspective values are used to calculate a z-aix value to map a point from 3D space to 2D canvas.
author Thinker K.F. Li <thinker@branda.to>
date Tue, 01 Dec 2009 22:55:27 +0800
parents 6394a1e33b2f
children ccc6bdc7e5a0
files src/graph_engine_skia.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/graph_engine_skia.cpp	Tue Dec 01 22:55:27 2009 +0800
+++ b/src/graph_engine_skia.cpp	Tue Dec 01 22:55:27 2009 +0800
@@ -108,6 +108,9 @@
 	(sk).setSkewY(CO_AIX_2_SKSCALAR((mb)[3]));	\
 	(sk).setScaleY(CO_AIX_2_SKSCALAR((mb)[4]));	\
 	(sk).setTranslateY(CO_AIX_2_SKSCALAR((mb)[5]));	\
+	(sk).setPerspX(0);				\
+	(sk).setPerspY(0);				\
+	(sk).set(SkMatrix::kMPersp2, 1);		\
     }
 #define SKMATRIX_2_MB_MATRIX(mb, sk) {				\
 	(mb)[0] = SKSCALAR_2_CO_AIX((sk).getScaleX());		\