Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, January 17, 2007 4:43:18 AM(UTC)

marasma  
marasma

Groups: Registered
Posts: 51


Hi,
How can I delete the last segment of a Annpolyline or similar wile I drawing it?
I just try to delete the last annpoint in drawdesigner, but it fails, and drawdesigner points collection is always empty!.
I'm using LT14.5 with VB.NET and I manage annotation without AnnAutomation, but in manual mode.
Thanks!
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, January 18, 2007 5:30:53 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)


Did you try to use the RasterCollection.Remove Method for this?

 
#3 Posted : Tuesday, January 30, 2007 12:11:59 AM(UTC)

marasma  
marasma

Groups: Registered
Posts: 51


Thanks!
I found the solution, I delete the right point in the rastercollection and in the controlpoints collection.
Now I have to add a point in a AnnPolylineObject at the mouse location! I think I can use the same method of the delete function, but I need to know between wich two points of the polyline I have to add the new one! How can I identify them?
I'm using LT 14.5 with VB.NET
Thanks
 
#4 Posted : Wednesday, January 31, 2007 6:35:24 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)












One way to do that is to go through all line segments and check if the new point lies between the segment's 2 ends.
If the segment points are (X1, Y1) and (X2, Y2), and the new point is (Xn, Yn), the 2 conditions for non-vertical segments are:
(Y2-Y1)/(X2-X1) = (Yn-Y1)/(Xn-X1)
AND
X1<Xn<X2
Of course there are other cases (e.g when X1=X2=Xn) where you need to modify the formula.

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.063 seconds.