How to control the display position of handwriting on different devices?
l
long junhao
started a topic
about 3 years ago
Hi MyScript:
First, the demo has been set up:
Then, File.iink file saved on one phone contains the math and diagram handwriting displayed in the center of the screen, and is copied to another phone with a different screen size, but the math and diagram handwriting positions are displayed inconsistently. That is, the display position of the same handwriting file changes on mobile phones with different screen sizes. How to control the display position of handwriting on different devices?
Thank you for your time,
longjunhao
Best Answer
O
Olivier @MyScript
said
almost 3 years ago
Dear longjunhao,
thank you for the update.
Currently, we have no API to do this easily ; this can be done manually doing a "zoomout" until the diagram fits to the screen.
Or, programatically, I just came up with the following idea:
-On device 1, you could export as JIIX. You would then have the coordinates (in milimeters) of the bounding-box
your application load the iink file, and the coordinates of the bounding-box of your diagram
=>You should then be able to determine the zoom factor to apply to fit your Diagram on device 2.
Let me know if this helps.
Best regards,
Olivier
l
long junhao
said
about 3 years ago
Sorry, the picture on the question is not shown, the picture is as follows:
O
Olivier @MyScript
said
about 3 years ago
Dear Long Junhao,
thank you for your question.
Indeed, when copying one .iink file from one device to the other, the iink SDK will re-factor the rendering according to the resolution of the device, screen size...
Nevertheless, could you provide with a screenshot of both devices, so that we better understand what is happening?
Thank you,
Best regards,
Olivier
l
long junhao
said
almost 3 years ago
Thank you for your answer, I am very sorry to reply to you now.
On the first device, two interfaces, diagram and math, are written. The screenshot is as follows:
Then copy the data/data/com.myscript.iink.demo of this device to another device. Open the .iink file on another device, the screenshot is as follows:
The first device is a large screen, and the other device has a smaller screen. As shown in the screenshot, when the .iink file on the large screen is displayed on the small screen, the diagram display is incomplete. math performance is different from diagram.
Thank you,
Best regards,
longjunhao
l
long junhao
said
almost 3 years ago
Dear Olivier,
by the way.
This question is asked because: MyScript's .iink in the new requirements has a cloud backup function, which will synchronize the .iink to different devices, so there will be the above problems.
Thank you,
Best regards,
longjunhao
O
Olivier @MyScript
said
almost 3 years ago
Dear Longjunhao,
thank you for the screenshot and precision.
Currently, the difference you notice in between Math and Diagram parts is the expected behavior.
In Math, we resize so that the content is fully displayed on the screen, while we do not resize in Diagram.
In Diagram, you can try to play with the zoom to display the whole content.
Best regards,
Olivier
l
long junhao
said
almost 3 years ago
Dear Olivier,
Can I adjust resize in Diagram to make the content fully displayed on the screen? Or in Math, resize is not called. This can make Math and Diagram phenomena consistent.
Because in my project, the "Diagram" of two devices may be included at the same time. If I set "zoom", I also need to distinguish which device "Diagram" comes from.
long junhao
Hi MyScript:
First, the demo has been set up:
Then, File.iink file saved on one phone contains the math and diagram handwriting displayed in the center of the screen, and is copied to another phone with a different screen size, but the math and diagram handwriting positions are displayed inconsistently. That is, the display position of the same handwriting file changes on mobile phones with different screen sizes. How to control the display position of handwriting on different devices?
Thank you for your time,
longjunhao
Dear longjunhao,
thank you for the update.
Currently, we have no API to do this easily ; this can be done manually doing a "zoomout" until the diagram fits to the screen.
Or, programatically, I just came up with the following idea:
-On device 1, you could export as JIIX. You would then have the coordinates (in milimeters) of the bounding-box
-On device 2:
Let me know if this helps.
Best regards,
Olivier
- Oldest First
- Popular
- Newest First
Sorted by PopularOlivier @MyScript
Dear longjunhao,
thank you for the update.
Currently, we have no API to do this easily ; this can be done manually doing a "zoomout" until the diagram fits to the screen.
Or, programatically, I just came up with the following idea:
-On device 1, you could export as JIIX. You would then have the coordinates (in milimeters) of the bounding-box
-On device 2:
Let me know if this helps.
Best regards,
Olivier
long junhao
Sorry, the picture on the question is not shown, the picture is as follows:
Olivier @MyScript
Dear Long Junhao,
thank you for your question.
Indeed, when copying one .iink file from one device to the other, the iink SDK will re-factor the rendering according to the resolution of the device, screen size...
Nevertheless, could you provide with a screenshot of both devices, so that we better understand what is happening?
Thank you,
Best regards,
Olivier
long junhao
Thank you for your answer, I am very sorry to reply to you now.
Demos are installed on both devices, only replacing MyCertificate.java, and no other code has been modified. Demo address: https://github.com/MyScript/interactive-ink-examples-android
On the first device, two interfaces, diagram and math, are written. The screenshot is as follows:
Then copy the data/data/com.myscript.iink.demo of this device to another device. Open the .iink file on another device, the screenshot is as follows:
The first device is a large screen, and the other device has a smaller screen. As shown in the screenshot, when the .iink file on the large screen is displayed on the small screen, the diagram display is incomplete. math performance is different from diagram.
Thank you,
Best regards,
longjunhao
long junhao
Dear Olivier,
by the way.
This question is asked because: MyScript's .iink in the new requirements has a cloud backup function, which will synchronize the .iink to different devices, so there will be the above problems.
Thank you,
Best regards,
longjunhao
Olivier @MyScript
Dear Longjunhao,
thank you for the screenshot and precision.
Currently, the difference you notice in between Math and Diagram parts is the expected behavior.
In Math, we resize so that the content is fully displayed on the screen, while we do not resize in Diagram.
In Diagram, you can try to play with the zoom to display the whole content.
Best regards,
Olivier
long junhao
Dear Olivier,
Can I adjust resize in Diagram to make the content fully displayed on the screen? Or in Math, resize is not called. This can make Math and Diagram phenomena consistent.
Because in my project, the "Diagram" of two devices may be included at the same time. If I set "zoom", I also need to distinguish which device "Diagram" comes from.
Thank you,
Best regards,
longjunhao