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

isLinear check and codepaths for that #170

Merged
merged 5 commits into from Jan 3, 2022
Merged

Conversation

Pomax
Copy link
Owner

@Pomax Pomax commented Jan 2, 2022

Closes #148 once finished.

  • add linearity check
  • add translation-based offsetting for linear segments.
    • with support for graduation
  • add outline tests for linear curves
  • use the true linear endpoints rather than start/end filed as separate issue
  • make sure linear segments inside a larger offset curve still work

This also changes the drawShape() function in the graphics API, as end caps were linear cubic curves, which was a bit weird. They're not linear quadratics, which is still a little weird, but at least marginally better.

@Pomax
Copy link
Owner Author

Pomax commented Jan 2, 2022

Correct cases (taking into account this does not resolve the true start/end coordinates yet):

image

@Pomax Pomax merged commit d9b454a into master Jan 3, 2022
@Pomax Pomax deleted the fix-linear-offsetting branch January 3, 2022 06:19
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.

Calling .outline on a straight curve throws "cannot scale this curve. Try reducing it first"
1 participant