Is it possible to get a a2Pin object with this call???

GetCanvasView()->IsHitWorld( xw,
yw,wxLAYER_ALL,a2dCANOBJHITOPTION_NOROOT|a2dCANOBJHITOPTION_ALL );

it doesn't work for me :/

another way I found to get the pin under the cursor

        //get object relativ coord
        a2dAffineMatrix tRootInv = hitobject->GetTransformMatrix();
        tRootInv.Invert();
        double xh,yh;
        tRootInv.TransformPoint(m_xwprev, m_ywprev, xh, yh);

        //for all children
        for( a2dCanvasObjectList::iterator iterp =
hitobject->GetChildObjectList()->begin(); iterp !=
hitobject->GetChildObjectList()->end(); ++iterp )
         {
             a2dPin* pin = wxDynamicCast( (*iterp).Get(), a2dPin );

             if (pin!=NULL)
             {

                if ( pin->IsHitWorld(
a2dIterC(GetCanvasView()),a2dHitEvent( xh, yh, false)))
                {
                  //ok got it
               }
            }
        }

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Wxart2d-users_dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

Reply via email to