Interactive Ink

Is it possible to distinguish whether the stroke I entered is shape or not?

I was using it to distinguish whether the strokes entered in Analyzer of existing SDK were Shape or not.

Is this possible with iink sdk?

After inputting the coordinates and exporting them in JIIX format, 

we compared the stroke information and confirmed that they are different from the input coordinates.

Because of this, I can not match the entered and exported strokes.

Dear Hwayoung Choi,

thank you for your question.

In order to extract shapes from text, you can use the "Raw Content" part. You can find an example in the latest release of the iink.

Regarding your second question, currently, the JIIX contains coordinates in mm, while you input pixels. To get the conversion in between the pixels and coordinates from the JIIX, you can use the getViewTransform function  of the renderer:

For example, you can convert mm to pixel as follows:

-Get Transform: Transform transform = editor.getRenderer().getViewTransform();

-Apply transform to coordinates: Point transformedPoint = transform.apply(xcoordMm, ycoordMm);

-Get x and y coordinates of point:float transformedPointX = transformedPoint.x;float transformedPointY = transformedPoint.y;

Let us know if this helps.

Best regards,


I applied it as you told me, but the numbers do not match.

Is not it possible to compensate for rendering?

For reference, I was working on offscreen and set dpi to 96.

Dear Hwayoung Choi,

Ideally, the ink resolution should be gotten from your device manufacturer. you should then set the resolution accordingly, when calling the "createRenderer" function (see the "setEngine" function in the EditorView class of the  uireferenceimplementation package).

Based on the different tests we did, resolution of pen and paper devices is around 130 DPI (as said above, only the device manufacturer can provide with the exact resolution).

Best regards,


Login or Signup to post a comment