iink SDK on Device

Answered

Text auto align left in Text Block while save package to iink file or load package from iink file

Hi guys,

I'm trying to store my drawing, but when i save package as a iink file, then reload the iink file to package, the drawing not display as what i saved it. see screenshots.

before saving to package:

https://drive.google.com/open?id=1LIQXz8uS3fZJbpGjtNu0LmKFoyt9dlxx

after reload the iink file:

https://drive.google.com/open?id=1iw1XD3g2pQVn1M8hH6cBFWzR69VAJVv3

Or When i drawing the text, what decide the block original point ?

any ideas ?


Thanks!


Best Answer

Dear Xiaoming Jin,


thank you for the update.


Currently, can you please check the following:

-You are using the en_US language

-You are in a "Text" part and not a "Text Document" part.

-the guide lines are deactivated ; this is done as follows: conf.setBoolean("text.guides.enable", false);

-The proper resolution was set when creating the renderer (engine.createRenderer(displayMetrics.xdpi, displayMetrics.ydpi, this);) ; you shall indeed set the one of your input device (e.g. pen, tablet...) and not the one of the input device.


Also, ensure you leave "enough space" in between lines, and try to write on straight lines (if lines go up or down, the above behavior may also occur).


Best regards,


Olivier


Dear Xiaoming Jin,

Thank you for contacting us.

Currently, you shall imagine the "Text Document" part splitted into columns. These are basically used to have a proper indentation of the notes. What happens is that when the ink is reflown, it is aligned on these columns.

This is exactly what happens when saving and re-opening the contentPackage (.iink file), the ink is reflown to align on these columns.

You then understand nothing can be done to prevent this from occurring, as it "as designed".

Best regards,

Olivier

Hi Olivier,

Thanks for your reply, but do you know why the text mixed ? 

image



image

image

This triggered while i save the package



Answer

Dear Xiaoming Jin,


thank you for the update.


Currently, can you please check the following:

-You are using the en_US language

-You are in a "Text" part and not a "Text Document" part.

-the guide lines are deactivated ; this is done as follows: conf.setBoolean("text.guides.enable", false);

-The proper resolution was set when creating the renderer (engine.createRenderer(displayMetrics.xdpi, displayMetrics.ydpi, this);) ; you shall indeed set the one of your input device (e.g. pen, tablet...) and not the one of the input device.


Also, ensure you leave "enough space" in between lines, and try to write on straight lines (if lines go up or down, the above behavior may also occur).


Best regards,


Olivier

Thanks Olivier, that make senses.