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 segments are not joined #132

Open
ygra opened this issue Feb 2, 2020 · 3 comments
Open

Path segments are not joined #132

ygra opened this issue Feb 2, 2020 · 3 comments

Comments

@ygra
Copy link

@ygra ygra commented Feb 2, 2020

This can looks really bad with larger stroke widths. One workaround might be to use square or round line caps, but then every line segment gets longer, which might not be what was intended originally.

image
image

This also sometimes leads to rendering errors around the missing joint:

image
image
image

As if there's a self-intersecting path that's filled with even-odd.

@pshihn
Copy link
Collaborator

@pshihn pshihn commented Feb 2, 2020

Are you adapting existing SVG paths with rough or drawing fresh shapes?
It's not very well optimized for converting arbitrary SVG paths right now. There's a lot of randomness in the algorithm so when complex paths are interpreted they can get skewed.

@ygra
Copy link
Author

@ygra ygra commented Feb 2, 2020

I'm trying to draw existing SVG paths (and for the current drawing mode, I also have to convert simple shapes to paths in nearly all cases). So there's no real way of knowing at drawing time which line-cap mode is appropriate. I already use square for drawing rectangles, though, so the blue + icon above isn't as bad anymore right now.

@pshihn
Copy link
Collaborator

@pshihn pshihn commented Apr 9, 2020

I suspect it's the way the particular SVG path is defined. If it's broken into chunks then rough will treat each chunk as own shape. The traditional line joins are not the same because it's a different shape not a continuous ones.

Also, if you are using SVG, you can set appropriate attributes yourself on the SVG node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.