|
@@ -62,9 +62,11 @@ open class SGraphyItem(parent: SGraphyItem? = null) {
|
|
|
*/
|
|
|
fun toChildMotionEvent(child: SGraphyItem, e: SMotionEvent): SMotionEvent {
|
|
|
val ce = SMotionEvent(e)
|
|
|
- ce.matrix.postTranslate(child.pos.x, child.pos.y);
|
|
|
- ce.matrix.postScale(child.scale.x, child.scale.y);
|
|
|
- ce.matrix.postRotate(child.rotate,0f, 0f);
|
|
|
+ ce.matrix.preTranslate(child.pos.x, child.pos.y);
|
|
|
+ ce.matrix.preScale(child.scale.x, child.scale.y);
|
|
|
+ ce.matrix.preRotate(child.rotate,0f, 0f);
|
|
|
+
|
|
|
+
|
|
|
// 不跟随缩放
|
|
|
if (!child.isTransform) {
|
|
|
ce.matrix.postScale(child._inverseScale, child._inverseScale);
|
|
@@ -627,9 +629,9 @@ open class SGraphyItem(parent: SGraphyItem? = null) {
|
|
|
val m = Matrix()
|
|
|
val list = this.itemPath()
|
|
|
for ( item in list) {
|
|
|
- m.postTranslate(item.pos.x, item.pos.y);
|
|
|
- m.postScale(item.scale.x, item.scale.y);
|
|
|
- m.postRotate(item.rotate)
|
|
|
+ m.preTranslate(item.pos.x, item.pos.y);
|
|
|
+ m.preScale(item.scale.x, item.scale.y);
|
|
|
+ m.preRotate(item.rotate)
|
|
|
// 如果不进行变形处理,则取消 painter 的变型操作
|
|
|
if (!item.isTransform){
|
|
|
m.postScale(item._inverseScale, item._inverseScale);
|