# HG changeset patch # User Thinker K.F. Li # Date 1259679327 -28800 # Node ID 663d361eb3b835ba5863b9cd3609a8e671216b0d # Parent 6394a1e33b2f9dca6accc4d79e40fc635e9c358e 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. diff -r 6394a1e33b2f -r 663d361eb3b8 src/graph_engine_skia.cpp --- 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()); \