Greetings Listers,
I am working with Lead Document Imaging 14.5 under Visual Basic 6. I am attempting to follow the online examples for creating a polygon, but I am not getting the results that I expect. The code I am using follows the following pattern:
Public Function DrawFourVertexPolygon( ByVal x1 As Double, ByVal y1 As Double, _
ByVal x2 As Double, ByVal y2 As Double, _
ByVal x3 As Double, ByVal y3 As Double, _
ByVal x4 As Double, ByVal y4 As Double) As Long
Dim hObjAn As Long
LEAD1.AnnUserMode = ANNUSER_DESIGN
hObjAn = LEAD1.AnnCreate(ANNOBJECT_POLYGON, True, True)
LEAD1.AnnDefine hObjAn, x1, y1, ANNDEFINE_BEGINSET
LEAD1.AnnDefine hObjAn, x2, y2, ANNDEFINE_APPEND
LEAD1.AnnDefine hObjAn, x3, y3, ANNDEFINE_APPEND
LEAD1.AnnDefine hObjAn, x4, y4, ANNDEFINE_END
LEAD1.AnnUserMode = ANNUSER_RUN
LEAD1.AnnSetForeColor hObjAn, RGB(20, 90, 20), False
DrawFourVertexPolygon = hObjAn
End Function
I am only seeing three vertexes. I tried various combinations of append to no good effect. I browsed through the annotation examples, but these all depend on mouse clicks, and some assumptions appear to be made by Lead based on the tool mode that I do not understand.
I have already looked through the following posts:
http://support.leadtools.com/SupportPortal/cs/forums/22103/ShowPost.aspx
http://www.leadtools.com/Help/LEADTOOLS/v15/DH/TO/Leadtools.Topics~Leadtools.Topics.AnnPolygonObject.html
And I also did a search of http://support.leadtools...forums/13/ShowForum.aspx and did not see any examples of constructing polygon annotations programatically. None of the 14 posts related to Polygon provide any insight into this problem.
I appreciate your time.