[android] Fix transform of location in hitTesting.

This commit is contained in:
Mikael Sand
2018-12-11 20:43:01 +02:00
parent 6df918356b
commit 4b65c00912
4 changed files with 4 additions and 4 deletions
@@ -197,7 +197,7 @@ class GroupView extends RenderableView {
float[] dst = new float[2]; float[] dst = new float[2];
mInvMatrix.mapPoints(dst, src); mInvMatrix.mapPoints(dst, src);
mInvTransform.mapPoints(dst, src); mInvTransform.mapPoints(dst);
int x = Math.round(dst[0]); int x = Math.round(dst[0]);
int y = Math.round(dst[1]); int y = Math.round(dst[1]);
@@ -434,7 +434,7 @@ abstract public class RenderableView extends VirtualView {
float[] dst = new float[2]; float[] dst = new float[2];
mInvMatrix.mapPoints(dst, src); mInvMatrix.mapPoints(dst, src);
mInvTransform.mapPoints(dst, src); mInvTransform.mapPoints(dst);
int x = Math.round(dst[0]); int x = Math.round(dst[0]);
int y = Math.round(dst[1]); int y = Math.round(dst[1]);
@@ -977,7 +977,7 @@ class TSpanView extends TextView {
float[] dst = new float[2]; float[] dst = new float[2];
mInvMatrix.mapPoints(dst, src); mInvMatrix.mapPoints(dst, src);
mInvTransform.mapPoints(dst, src); mInvTransform.mapPoints(dst);
int x = Math.round(dst[0]); int x = Math.round(dst[0]);
int y = Math.round(dst[1]); int y = Math.round(dst[1]);
@@ -87,7 +87,7 @@ class UseView extends RenderableView {
float[] dst = new float[2]; float[] dst = new float[2];
mInvMatrix.mapPoints(dst, src); mInvMatrix.mapPoints(dst, src);
mInvTransform.mapPoints(dst, src); mInvTransform.mapPoints(dst);
VirtualView template = getSvgView().getDefinedTemplate(mHref); VirtualView template = getSvgView().getDefinedTemplate(mHref);
int hitChild = template.hitTest(dst); int hitChild = template.hitTest(dst);