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, June 11, 2008 5:36:27 AM(UTC)

aah  
aah

Groups: Registered
Posts: 12


Hi
i am trying to do the same thing by getting all the pPoint of the region and passing them to the procedure AnnDefine.
To get the pPoint of the region perimeter i try to use the GetRgnContourPoints procedure.
So my question is how can i acces to individual pPoints returned by the GetRgnContourPoints procedure?
Thanks for your help and sorry for my so poor english
 

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, June 12, 2008 3:53:42 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,022

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


Are you also using v15? What is your programming interface?


 


What type of region are you trying to acquire (rectangle, polygon, etc.)?

 
#3 Posted : Thursday, June 12, 2008 4:00:43 AM(UTC)

aah  
aah

Groups: Registered
Posts: 12


I uses V14 under delphi 2005
I am trying to acquire free hand region

 
#4 Posted : Sunday, June 15, 2008 1:28:24 AM(UTC)

Yasir Alani  
Guest

Groups: Guests
Posts: 3,022

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

If you are using the VCL LEAD Main (or Annotations) control, you can get the region contour points like this:
// In the Var section:
pPoints: pPoint;
PtSize: Cardinal;
i : Integer;
// Code snippet
LEADAnn1.GetRgnContourPoints(pPoints, PtSize);
For i := 1 to PtSize do
Begin
//Point number i sax X/Y coordinates of pPoints.X and pPoints.Y
inc(pPoints); // move to the next point in the array of points
End;

However, it will not be easy to convert these points to an annotations object, because the points will not trace the contour from the outside. The will list all region contour points from top to bottom and from left to right (line by line, horizontally).

If you want to get the points as they are being drawn by the user, you can capture the movement using the MouseMove event and store the points.
 
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.074 seconds.