I am using the trial version of GDPicture .Net. I am using the following code to add annotations programmatically to an image. It works and displays the first annotation added. But if the same code is executed a second time, the annotation manager has both annotations in it but the second one does not display in the GDViewer. I manually moved the first annotation added to a different location (so the second one would not be on top of the first one) before executing the code for the second time. Any help would be appreciated. The GdViewer GetAnnotationCount returns a value of 1 after adding the second annotation.
Code: Select all
annotMgr = New AnnotationManager
annotMgr.InitFromGdPictureImage(imageID)
annotMgr.SelectPage(GdViewer1.CurrentPage)
Dim rect As AnnotationRectangle = annotMgr.AddRectangleAnnot(Color.Red, Color.Red,
CSng(oGdPictureImaging.GetWidthInches(imageID)) / 2,
CSng(oGdPictureImaging.GetHeightInches(imageID)) / 2, 0.3, 0.1)
annotMgr.Close()
Me.GdViewer1.DisplayFromGdPictureImage(imageID)