-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
1 person likes this
J
Just GoNXaS
said
over 2 years ago
Another question, also regarding Drawing.
Is there any way to set the pen in an "eraser" mode (Something to erase previous strokes?)
Thanks!
J
Just GoNXaS
said
over 2 years ago
Hey Oliver
I was trying to add a PNG image to a drawing part using [self.editor addImage:CGPointZero file:path mimeType:IINKMimeTypePNG error:&error], but I'm getting the following error:
[IINKEditor addImage:file:mimeType:error:]::429 addImage not supported" UserInfo={NSLocalizedFailureReason=Error, -[IINKEditor addImage:file:mimeType:error:]::429 addImage not supported
The path id /Users/gonxas/Library/Developer/CoreSimulator/Devices/D7211477-3659-42BD-B25E-4BDFF59BBD35/data/Containers/Bundle/Application/0F5A7BEB-D50B-49E8-A907-06140E578C0E/DcWealth.app/test.png
Am I using the wrong method?
Thanks
O
Olivier @MyScript
said
almost 3 years ago
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
E
Ethan Chan
said
almost 3 years ago
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?
O
Olivier @MyScript
said
almost 3 years ago
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?
Ethan Chan
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.
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:
case InputModeErase:
pointerType = IINKPointerTypeEraser;
break;
Let us know if you have further questions.
Best regards,
Olivier
- Oldest First
- Popular
- Newest First
Sorted by Newest FirstOlivier @MyScript
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/#drawingLet us know if you need any help using it.
Best regards,
Olivier
Just GoNXaS
Hey Oliver.
Thanks, it's working with that change.
Quick question, is there any way to change the radius of the eraser?
Thanks again!
Olivier @MyScript
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:
case InputModeErase:
pointerType = IINKPointerTypeEraser;
break;
Let us know if you have further questions.
Best regards,
Olivier
1 person likes this
Just GoNXaS
Another question, also regarding Drawing.
Is there any way to set the pen in an "eraser" mode (Something to erase previous strokes?)
Thanks!
Just GoNXaS
Hey Oliver
I was trying to add a PNG image to a drawing part using [self.editor addImage:CGPointZero file:path mimeType:IINKMimeTypePNG error:&error], but I'm getting the following error:
[IINKEditor addImage:file:mimeType:error:]::429 addImage not supported" UserInfo={NSLocalizedFailureReason=Error, -[IINKEditor addImage:file:mimeType:error:]::429 addImage not supported
The path id /Users/gonxas/Library/Developer/CoreSimulator/Devices/D7211477-3659-42BD-B25E-4BDFF59BBD35/data/Containers/Bundle/Application/0F5A7BEB-D50B-49E8-A907-06140E578C0E/DcWealth.app/test.png
Am I using the wrong method?
Thanks
Olivier @MyScript
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
Ethan Chan
Olivier @MyScript
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