About   |   Getting Started   |   Downloads   |   Documentation   |   Forum


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tool snapping and HitTests
08-23-2016, 06:21 PM
Post: #1
Tool snapping and HitTests
In the Plugin class, when we enable tool snapping to art, is there a certain number of points or pixels (which varies with zoom level) before it snaps? Or is this picked up from the user preferences?

I'm finalizing a plugin that drills down through multiple layers of objects at a particular point, and am looking for a balance of user-friendly (most I'm sure are using high-res monitors with medium-res tablets) so snap-to-art helps! If my follow-up HitTests are too broad, I get multiple hits on the same path. If it's too small, it often misses close-by paths altogether. At this point I'm pretty sure the best compromise is to allow users to set sensitivity settings, which translate into HitData.tolerance_.

Is there some setting or approach I may be overlooking?

BTW, PathArt.getIntersections is awesome!

Thanks -- rj
Find all posts by this user
Quote this message in a reply
08-30-2016, 10:40 AM
Post: #2
RE: Tool snapping and HitTests
(08-23-2016 06:21 PM)Rick Johnson Wrote:  In the Plugin class, when we enable tool snapping to art, is there a certain number of points or pixels (which varies with zoom level) before it snaps? Or is this picked up from the user preferences?

Yes, there is a user-adjustable Illustrator preference for the smart guides tolerance.
Find all posts by this user
Quote this message in a reply
09-01-2016, 07:42 PM
Post: #3
RE: Tool snapping and HitTests
Thanks, Garrett, I didn't make the connection between "snapping" and "smart guides." I don't want my plugins to rely on smart guides being enabled, but want to help users find paths, points, and intersections easier, even if they're a little shaky or their tablets are relatively small compared to their monitor resolution (I suspect this is a pretty common situation) so I'll study the headers some more and be governed accordingly. ;-)
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)