Page 1 of 1

Undo with ContinuousMode turned on.

Posted: Thu Jun 30, 2016 3:51 pm
by Strand
Hello, I am allowing my users to add annotations to a pdf by using the following method:

Code: Select all

gdViewer1.AddFreeHandAnnotInteractive(this.useColor, (float)(0.02), System.Drawing.Drawing2D.LineCap.Flat, System.Drawing.Drawing2D.LineCap.Flat, 1,true);
Notice the Continuous Mode is true, thus allowing the user to pick up their pen and draw as long as they want. However, i have some questions reguarding ending their "Session" and undo.

1. My undo button looks like this:

Code: Select all

gdViewer1.DeleteAnnotation(gdViewer1.GetAnnotationCount() - 1);
but in Continuous Mode, this would undo ALL their pen marks How do I undo each mark in this case?

2. Is there a method to call that would end their mode with the freehand tool, perhaps a selection mode method??

Re: Undo with ContinuousMode turned on.

Posted: Fri Sep 09, 2016 4:28 pm
by Cedric
Hello,

1. From what I understand it is the wanted behavior because as long as the drawing mode is enabled, the same annotation is being drawn so cancel the drawing will cancel the whole annotation.

2. As per the documentation, the drawing mode is ended on the first double-click operation. This is at this time that the annotation is built from the (possibly multiple) paths the user has drawn.