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

makeRoundCap wrong #15

Open
benoitwimart opened this issue Sep 11, 2024 · 1 comment
Open

makeRoundCap wrong #15

benoitwimart opened this issue Sep 11, 2024 · 1 comment

Comments

@benoitwimart
Copy link

Hi,

For some path, makeRoundCap is not correct :
this one : <path d="M700 400 L900 550" fill="none" stroke="#1405aa"></path>

Demo :
https://codepen.io/benoitwimart/pen/abgMGMa

Any idea why ?

@benoitwimart
Copy link
Author

It's look better with :

  function preparePath(path, offset) {
      var source = path.clone({ insert: false });
      source.reduce({});
      if (!path.clockwise) {
          //source.reverse();
          //offset = -offset;
      }
      return [source, offset];
  }

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

1 participant