I want to erase stroke by an eraser ,not gesture or undo。
I'm using swift iink, do you have any sample codes?
Best Answer
O
Olivier @MyScript
said
over 1 year ago
Dear Mangal,
currently, when you want to set the eraser mode, in the handleOnTouchForPointer function, you shall set the iinkPointerType to ERASER: iinkPointerType = PointerType.ERASER;
If you are using the pointerEvents API to add strokes from an external device, you can set the type variable in the following functions:
-for pointerMove, pointerUp and pointerDown, you should set "type:(IINKPointerType)type" to IINKPointerTypeEraser
-if using the pointerEvents function (which we rather recommend when inputting strokes from an external device), you should set the IINKPointerTypeEraser to each PointerEvent
Let us know if you need further explanation.
Best regards,
Olivier
q
qian bin
said
over 2 years ago
Hello
Thank you for your detail explain, but I still need some help, after read your document and search the forums I write codes like below , but it doesn't work
I'm new to ios ,now I'm using swift to make my app,so it would be better if you give me some swift code ,first I tried swift but failed,because I don't know how to deal with the parameters.
O
Olivier @MyScript
said
over 1 year ago
Answer
Dear Mangal,
currently, when you want to set the eraser mode, in the handleOnTouchForPointer function, you shall set the iinkPointerType to ERASER: iinkPointerType = PointerType.ERASER;
qian bin
Hello,
I want to erase stroke by an eraser ,not gesture or undo。
I'm using swift iink, do you have any sample codes?
Dear Mangal,
currently, when you want to set the eraser mode, in the handleOnTouchForPointer function, you shall set the iinkPointerType to ERASER: iinkPointerType = PointerType.ERASER;
Best regards,
Olivier
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstOlivier @MyScript
Dear Qian Bin,
thank you for your question.
Currently, you should set the IINKPointerType to Eraser:
typedef NS_ENUM(NSUInteger, IINKPointerType ) {
IINKPointerTypePen,
IINKPointerTypeTouch,
IINKPointerTypeEraser,
};
(see http://cocoadocs.org/docsets/MyScriptInteractiveInk-Runtime/1.0.0/Constants/IINKPointerType.html).
If you are using the pointerEvents API to add strokes from an external device, you can set the type variable in the following functions:
-for pointerMove, pointerUp and pointerDown, you should set "
type:(IINKPointerType)type" to IINKPointerTypeEraser
-if using the pointerEvents function (which we rather recommend when inputting strokes from an external device), you should set the
IINKPointerTypeEraser
to each PointerEventLet us know if you need further explanation.
Best regards,
Olivier
qian bin
Hello
Thank you for your detail explain, but I still need some help, after read your document and search the forums I write codes like below , but it doesn't work
I'm new to ios ,now I'm using swift to make my app,so it would be better if you give me some swift code ,first I tried swift but failed,because I don't know how to deal with the parameters.
Olivier @MyScript
Dear Mangal,
currently, when you want to set the eraser mode, in the handleOnTouchForPointer function, you shall set the iinkPointerType to ERASER: iinkPointerType = PointerType.ERASER;
Best regards,
Olivier