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

It is hard to select single-segment horizontal or vertical lines #4

Open
iwbnwif opened this issue Aug 6, 2016 · 0 comments
Open

Comments

@iwbnwif
Copy link
Owner

iwbnwif commented Aug 6, 2016

This is because the first test in wxSFLineShape::GetHitLinesegment is whether the point is within the line's bounding box.

Given that a horizontal line has a bounding box of 2px height, it requires very accurate mouse placement.

Suggest to inflate the line bounding box before testing for "Contains".

    wxRect wholeLineBB = GetBoundingBox();
    wholeLineBB.Inflate(3);

    if(!wholeLineBB.Contains(pos))
        return -1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant