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

object lineWidth isn't fully solid #782

Closed
Kurolox opened this issue Oct 12, 2019 · 1 comment
Closed

object lineWidth isn't fully solid #782

Kurolox opened this issue Oct 12, 2019 · 1 comment
Labels

Comments

@Kurolox
Copy link

Kurolox commented Oct 12, 2019

This is more of a question than anything, but I haven't been able to find anything in the documentation.

I'm trying to make hollow figures by setting fillStyle: "transparent" and lineWidth: x. While it works, it seems like the objects aren't colliding at the border of the linewidth, but at the middle point between the object width and the border width, causing issues like this one:

1570872334

If you activate the wireframes everything is working properly, but I'm not sure if there's any way to make the wireframe account for the border size so this doesn't happen.

1570872438

@liabru liabru added the question label Mar 6, 2020
@liabru
Copy link
Owner

liabru commented Mar 6, 2020

As far as I know canvas doesn't support stroke alignment other than the centre, so you'd have to adjust for this manually using some custom rendering, the easiest approach might be to set the canvas scale before drawing the body. See my also my answer to #779 which is a similar issue.

@liabru liabru closed this as completed Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants