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 : Friday, February 24, 2006 12:24:14 PM(UTC)
Tom Bell

Groups: Registered
Posts: 4


    I need to understand how the hit testing for closed figures works.  I can seemingly only get a SUCCESS returned on a HitTest when dealing with circles.  Rectangles and Polygons always fail.

Can someone explain which vector objects support hit testing?  I realize that clicking directly on the object will return SUCCESS, but I'm looking for a surefire way to get the result of a user clicking INSIDE a vector object.

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 : Monday, February 27, 2006 4:56:08 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,040

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

HitTest should work for all objects.  Which version of LEADTOOLS are you using?  Can you post a sample project that shows the error?

 
#3 Posted : Monday, February 27, 2006 7:15:23 AM(UTC)
Tom Bell

Groups: Registered
Posts: 4


It does work for all objects, if you click directly ON the object.  Clicking inside closed objects though only works for circles.  I even confirmed this with your VecDemo32 program.

I am attaching a DWG file that shows the problem. Only the circle object in the upper left can be selected by clicking within the object. Everything else needs to be clicked on (on one of the lines composing the object).

I really need to be able to do hit testing WITHIN objects, as well as ON objects.  According to the SDK documentation, isn't this what hit testing on closed figures should do?

It seems like a bug to me, but if it is not, can you please explain why it is not and give me a workaround?

Thanks.
 
#4 Posted : Wednesday, March 1, 2006 4:02:24 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,040

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

If you are using the OCX, then try setting the HitTestFlags property to
VECTOR_HITTEST_CLOSEDFIGURES before calling HitTest.  If you are using the API, then call L_VecSetHitTest.

 
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-2019, Yet Another Forum.NET
This page was generated in 0.131 seconds.