iink SDK on Device

How do I convert millimeters into pixels

I drew a circle and exported the Jiix file. How do I convert the center and radius into pixels? They are now measured in millimeters


We're using handwritten word recognition,after lifting the hand, the text is recognized and activeBlockChanged is called, is there a configuration to control the time between lifting the hand and the text being recognized?

Dear User,


When exporting as JIIX, the latter will return with coordinates in milimeters. If you want to have coordinates in pixels, you will have to use the transform:
-https://developer.myscript.com/docs/interactive-ink/1.4/android/fundamentals/zooming-and-scrolling/#view-transformation-matrix
-And the API: https://developer.myscript.com/refguides/interactive-ink/android/1.4/com/myscript/iink/graphics/Transform.html

If you want to convert a point from milimeters to pixels, this is done as follows:
Transform tr= editor->getRenderer()->getViewTransform();
Point myPoint(x,y); //coordinates in milimeters
tr.apply(myPoint); //coordinates in pixels


Best regards,


Olivier

Login or Signup to post a comment