Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path.strokeCap square being used for hitTest #55

Closed
absolutehype opened this issue Oct 13, 2011 · 2 comments
Closed

path.strokeCap square being used for hitTest #55

absolutehype opened this issue Oct 13, 2011 · 2 comments
Assignees

Comments

@absolutehype
Copy link

Using strokeCap 'butt' for a path I have drawn but my hittests are returning that I have clicked on the path when I click in the region that would be filled with strokeCap square.

The hittest should take into account the strokeCap.

@lehni
Copy link
Member

lehni commented Nov 10, 2011

It is true that at the moment, strokeCap is not taken into consideration for hit-tests. But the hit-test code assumes cap and joints to be round, not squared. Since we're also offering hit-testing within a given tolerance of the actual stroke, implementing the other styles is not trivial. Perhaps we wait with doing so until with have the PathStroker code implemented that converts a stroked path to outlines, so we can then check within outlines in situations where we get results close to ends or joints that are outside of the stroke, and see how that performs...

@ghost ghost assigned lehni Feb 15, 2013
@lehni
Copy link
Member

lehni commented Jun 15, 2013

I have finally been able to resolve this in an elegant and performant way: 8b9fb37

@lehni lehni closed this as completed Jun 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants