iink SDK on Device

Answered

Background Color/ Image

Is there anyway I can add in a background to the notes? Ideally this would lead into adding in pdfs that are not selectable/ editable.


Best Answer

Dear Just,


thank you for your questions. To answer these:

-Currently, when calling the addImage function, it will create a new "Drawing" block. As only the "Text Document" part can have sub-blocks, you understand you should use the "addImage" only in Text Document blocks. In any other part, you will have the "addImage not supported" error message: https://developer.myscript.com/docs/interactive-ink/1.2/android/fundamentals/editing/#content-blocks


-Regarding having an erasure mode, you could proceed as follows:

  • In the iink\examples\ios\Frameworks\IInkUIReferenceImplementation\InputView.h file, you can define a new mode, e.g. InputModeErase
  • In the iink\examples\ios\Frameworks\IInkUIReferenceImplementation\InputView.mm file,in the pointerEventFromTouch function, add something such as:

        case InputModeErase:

            pointerType = IINKPointerTypeEraser;

            break;

           

Let us know if you have further questions.


Best regards,


Olivier


Dear Ethan,


Thank you for your question.


Currently, I am not sure to understand? Indeed, if you want to add a background image to your application, you can add it to the layout,, as you would do in any application?


Best regards,


Olivier

Hi Olivier, Thanks for the reply. Yes I’m able to change it in the layout but that won’t export with the document. Is there anyway to link it with the iink file?

Dear Ethan,


currently, is it for a text part or drawing part? Indeed, if for a drawing part, you can use the addImage function, and you will be able to draw on it.

 If for a text part, we have no way to add an image that could be exported with your text.


Best regards,


Olivier

Answer

Dear Just,


thank you for your questions. To answer these:

-Currently, when calling the addImage function, it will create a new "Drawing" block. As only the "Text Document" part can have sub-blocks, you understand you should use the "addImage" only in Text Document blocks. In any other part, you will have the "addImage not supported" error message: https://developer.myscript.com/docs/interactive-ink/1.2/android/fundamentals/editing/#content-blocks


-Regarding having an erasure mode, you could proceed as follows:

  • In the iink\examples\ios\Frameworks\IInkUIReferenceImplementation\InputView.h file, you can define a new mode, e.g. InputModeErase
  • In the iink\examples\ios\Frameworks\IInkUIReferenceImplementation\InputView.mm file,in the pointerEventFromTouch function, add something such as:

        case InputModeErase:

            pointerType = IINKPointerTypeEraser;

            break;

           

Let us know if you have further questions.


Best regards,


Olivier

Dear Just,


thank you for the update.


In drawing mode, the radius of the eraser can be tuned using the "drawing.eraser.radius" configuration key: https://developer.myscript.com/docs/interactive-ink/1.2/reference/configuration/#drawing


Let us know if you need any help using it.


Best regards,


Olivier