多点距离检测限制

时间:2016-12-12 09:10:47

标签: android canvas multi-touch ontouchevent

我使用具有多点触控功能的简单代码

  • 应用程序在某些情况下要求指针之间的距离彼此接近
  • 如果(指针1)靠近(指针2),则设备会将它们视为一个指针

这是硬件还是软件限制?

有关如何处理的任何建议吗?

1 个答案:

答案 0 :(得分:0)

我尝试了一个矩阵解决方案 (通过稍微设置小于1的比例

    matrix.setScale(.95,.95,/*center pivot (by "Computing the center bounds of the control points")*/,/*center pivot*/);

我的案例中的界限是画布的路径

"计算中心对于在旧点之间建立新点非常重要 - 看看img -

然后通过矩阵

转换点

这将给我一个可接受的解决方案,但不准确

Temp-solution