Text

Answered

How to delete a specified stroke without using PointerType.ERASE

 I know I can use editor.pointerDown ... pointerMove ... pointerUp to erase some strokes with the type PointerType.ERASE, But there are reasons why I cannot use this method to delete strokes:

First, even if some strokes are crossed by the erase type, the stroke may not be deleted by the ink system.

Second, I can not get which strokes have been erased by the ink system.


So, for my current situation, I need to know is there any ways to delete a specified stroke. 


Best Answer

Dear Chengkong,


thank you for the explanation, which is very clear.


Currently, in off-screen mode, there is no other easy alternative. The only I see is that you remove the strokes that were erased, and re-process the whole bunch of strokes, but this will use a lot of CPU.


Best regards,


Olivier


Dear Cheng Kong,


Thank you for your question.


  • Which content part are you using? 
  • How would you want to select a specified stroke?


Best regards,


Gwenaëlle

The  type of the content part I use is Text.

In order for you to understand my problem clearly, let me describe my current situation.

Your Interactive Ink SDK has a rendering system for drawing handwriting, but it need 4 bitmaps to work on. But this is a huge memory consumption, on some devices, creating 4 screen-sized bitmaps is enough to crash the application for the out of memory.

In addition, all the Editor's methods calls will be block during the recognition, This also makes me avoid using the IInk rendering system. Because the time consumed by the recognition system is acceptable on a demo application, but when it was integrated into my production environment application, the recognition time would increase significantly to an unacceptable level. The block will case the application not smooth when using.


Because of these issues, I created my own rendering system and use the off-screen usage, it works fine except the erase mode. I can erase any handwriting strokes on my render system, but how to let IInk recognition system know the stroke has been erased?

I know I can use PointerType.ERASE and pass the eraser's path to delete a stroke in your recognition system, but this method is imprecise. Is there a method that can delete a stroke when I pass a stroke id or something?

Maybe this question should be renamed as How to use eraser in the off-screen usage.

Answer

Dear Chengkong,


thank you for the explanation, which is very clear.


Currently, in off-screen mode, there is no other easy alternative. The only I see is that you remove the strokes that were erased, and re-process the whole bunch of strokes, but this will use a lot of CPU.


Best regards,


Olivier

  • Support
  • Forums
  • Text
  • How to delete a specified stroke without using PointerType.ERASE