Interactive Ink

[Android iink 1.1.2] how to use ERASER?In my app,user can switch pen or eraser,but the eraser recognition result is invalid in my project now.

I use it like this,I am sure I add the point type of  IPenConfig.ERASER to the engine,but it no use.

 

PointerType pType = PointerType.PEN;

 if (drawingPath.getPaintType() == IPenConfig.ERASER) {

 pType = PointerType.ERASER;

 }

pointDown(startPoint.x, startPoint.y, startPoint.time, pType, startPoint.p);

pointMove(*****);

pointMove(*****);

……

pointUp(*****);


Hello,

Your code seems fine, but don't really understand the problem you are facing: is your problem that the eraser does not erase anything?

Best regards

Gildas

yes,it does not erase anything

 The problem I am facing: the eraser does not erase anything.what can I do?

Hello,

If I write using the pen, then erase by changing pointer type, I have no issue.

The eraser not working could mean that you are trying to erase strokes that have not been recognized yet - that could happen if you are importing a large amount of stroke and try to erase before recognition is over (for optimal strokes import performances, see my answer about using editor.pointerEvents() here).

Do you have the eraser issue if you write just a few strokes directly on your device, in a new part, then try to erase?

best regards



Login or Signup to post a comment
  • Support
  • Forums
  • Interactive Ink
  • [Android iink 1.1.2] how to use ERASER?In my app,user can switch pen or eraser,but the eraser recognition result is invalid in my project now.