06-09-2017, 08:37 PM
Illustrator does indeed handle art drawn during tool drags by undoing the art on each drag event. If you coerce Illustrator into not undoing the art created during a tool drag then a nasty mess of thousands of annotated paths (one for each event) will appear on screen. So, during a tool drag event, draw whatever art you wish and then draw the art again during the final mouse-up event — it will not be undone by Illustrator in that context. The "final" mouse up event is determined by your tool's logic, as it might require 1, 2, ..., n clicks for your use-case.
While you can create art during other tool events, it is not recommended. Adobe intends you to use annotators for "drawing" during e.g. mouse-track events. Personally, I recommend storing & updating the points/beziers for the desired art during your mouse track and/or drag events in class members, using them to annotate during track events and to create actual art during drag/mouse-up events.
While you can create art during other tool events, it is not recommended. Adobe intends you to use annotators for "drawing" during e.g. mouse-track events. Personally, I recommend storing & updating the points/beziers for the desired art during your mouse track and/or drag events in class members, using them to annotate during track events and to create actual art during drag/mouse-up events.