This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, February 24, 2006 12:19:14 PM(UTC)
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.
#2
Posted
:
Monday, February 27, 2006 4:51:08 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 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:10:23 AM(UTC)
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 3:57:24 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 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.