Text

Answered

scroll in text document

I want to scroll to a perticular cgpoint

what should i do?


Best Answer

Dear Ganesh,

currently, this can be done using the setViewOffset function: https://developer.myscript.com/refguides/interactive-ink/android/1.3/com/myscript/iink/Renderer.html#setViewOffset-float-float-

It can be called as follows, where "point" is the point where you want to go.

Transform v = editorView.getEditor().getRenderer().getViewTransform();
v.ty = 0; //Cancels the y view offset in the transform
v.apply(point);
editorView.getRenderer().setViewOffset(point.x, point.y);


Best regards,

Olivier

1 Comment

Answer

Dear Ganesh,

currently, this can be done using the setViewOffset function: https://developer.myscript.com/refguides/interactive-ink/android/1.3/com/myscript/iink/Renderer.html#setViewOffset-float-float-

It can be called as follows, where "point" is the point where you want to go.

Transform v = editorView.getEditor().getRenderer().getViewTransform();
v.ty = 0; //Cancels the y view offset in the transform
v.apply(point);
editorView.getRenderer().setViewOffset(point.x, point.y);


Best regards,

Olivier