Selaa lähdekoodia

********************************** *********************
添加矩阵,调试缩放,位移

zhangweixin 3 vuotta sitten
vanhempi
commit
aa2607507d

+ 3 - 3
sybotan-android-graphy/src/main/java/com/sybotan/android/graphy/SGraphyItem.kt

@@ -69,9 +69,9 @@ open class SGraphyItem(parent: SGraphyItem? = null) {
                 ce.matrix.postScale(child._inverseScale, child._inverseScale);
             }
 //            se.setLocation((e.x - child.pos.x) / child.scale.x, (e.y - child.pos.y) / child.scale.y)
-//            val matrixMat = Matrix()
-//            ce.matrix.invert(matrixMat)
-            val matrixTransform = MatrixTools.matrixTransform(ce.matrix, e.viewX, e.viewY)
+            val matrixMat = Matrix()
+            ce.matrix.invert(matrixMat)
+            val matrixTransform = MatrixTools.matrixTransform(matrixMat, e.viewX, e.viewY)
             ce.x = matrixTransform.x
             ce.y = matrixTransform.y
             return ce