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

Fix mapping onto pixel for line #644

Merged
merged 5 commits into from Sep 9, 2018
Merged

Fix mapping onto pixel for line #644

merged 5 commits into from Sep 9, 2018

Conversation

ceball
Copy link
Member

@ceball ceball commented Sep 6, 2018

Previously, when a line was clipped, the computed end point on the bounds could be mapped to a pixel outside the bounds because of floating point error. This showed up as #570.

There should be no change for points or triangles. However:

  • triangles and lines can no longer share a 'map onto pixel' function
  • I've added some comments to points and triangles.

The code changes and comments should be reviewed carefully.

(The various 'build map for x' (and similar) functions seem a bit clumsy; should consider reorganizing the code a bit in the future. Have avoided doing that here so as not to confuse things.)

@jbednar
Copy link
Member

jbednar commented Sep 6, 2018

Looks great. Happy to see it merged once you check for other similar issues.

@ceball ceball changed the title WIP: fix mapping onto pixel Fix mapping onto pixel for line Sep 8, 2018
@ceball ceball requested a review from jbednar September 8, 2018 20:56
Copy link
Member

@jbednar jbednar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As best I can figure, this looks like the appropriate set of fixes. Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants