Undo with ContinuousMode turned on.

Discussions about annotation support.
Post Reply
Strand
Posts: 3
Joined: Thu Jun 30, 2016 3:42 pm

Undo with ContinuousMode turned on.

Post by Strand » Thu Jun 30, 2016 3:51 pm

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??

Cedric
Posts: 263
Joined: Sun Sep 02, 2012 7:30 pm

Re: Undo with ContinuousMode turned on.

Post by Cedric » Fri Sep 09, 2016 4:28 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest