Hot Door CORE Forum
hit test for path returns other art type - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: Bugs (http://hotdoorcore.com/forum/forumdisplay.php?fid=5)
+--- Thread: hit test for path returns other art type (/showthread.php?tid=211)



hit test for path returns other art type - Rick Johnson - 05-30-2019

When doing a hit test on a path with a point text object over it, this code does not detect the path:

Code:
hdi::core::HitData pHit = hdi::core::HitData(NULL, this->__Tool.cursorLoc(), hdi::core::SegPointOrInteriorHitRequest);

It's called while dragging, and again on mouseUp, with similar results every time. Shouldn't it filter hits by art type? Or perhaps I'm just using it incorrectly. Also, this code doesn't work as expected:

Code:
HDI_CORE_ILLUSTRATOR->currentDocument()->artAtPoint(this->__Tool.cursorLoc(), hdi::core::SegPointOrInteriorHitRequest);

The first item in the ArtVector is the text object, and the second is the path below it. I would expect both functions to return paths only.

I'm using Xcode 9.1 under Mojave.