Start a new topic
iink SDK on Device
i only know how to translate coordinate using Transform.apply(Point)
Dear Chai Chenxun,thank you for contacting us and your question.Indeed, as you have noticed, the iink is using milimiters, and thus converts the coordinates from pixel to milimeters. In order to convert from milimeters to pixel, you should call the "invert" function: https://developer.myscript.com/refguides/interactive-ink/android/1.3/com/myscript/iink/graphics/Transform.html#invert--Transform tr= editor.getRenderer().getViewTransform();tr.invert();Point pixelPoint = tr.apply(milimeterPoint);Best regards,Olivier
chai chenxun
i only know how to translate coordinate using Transform.apply(Point)
Dear Chai Chenxun,
thank you for contacting us and your question.
Indeed, as you have noticed, the iink is using milimiters, and thus converts the coordinates from pixel to milimeters. In order to convert from milimeters to pixel, you should call the "invert" function: https://developer.myscript.com/refguides/interactive-ink/android/1.3/com/myscript/iink/graphics/Transform.html#invert--
Transform tr= editor.getRenderer().getViewTransform();
tr.invert();
Point pixelPoint = tr.apply(milimeterPoint);
Best regards,
Olivier
Olivier @MyScript
Dear Chai Chenxun,
thank you for contacting us and your question.
Indeed, as you have noticed, the iink is using milimiters, and thus converts the coordinates from pixel to milimeters. In order to convert from milimeters to pixel, you should call the "invert" function: https://developer.myscript.com/refguides/interactive-ink/android/1.3/com/myscript/iink/graphics/Transform.html#invert--
Transform tr= editor.getRenderer().getViewTransform();
tr.invert();
Point pixelPoint = tr.apply(milimeterPoint);
Best regards,
Olivier