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

end_cap seems to have no effect if its LineCap::Square #907

Closed
TheNeikos opened this issue May 17, 2024 · 1 comment · Fixed by #908
Closed

end_cap seems to have no effect if its LineCap::Square #907

TheNeikos opened this issue May 17, 2024 · 1 comment · Fixed by #908
Labels

Comments

@TheNeikos
Copy link

I am using lyon through bevy_prototype_lyon and it exposes the StrokeOptions struct. However setting end_cap has no effect on the tesselated result.

Going through the source code, it seems that the handling of the end_cap is simply missing for anything except round? I do not know the code well enough to suggest a PR myself however (and could be totally wrong here)

if options.end_cap == LineCap::Round {
crate::stroke::tessellate_round_cap(
p1.position,
p1.half_width,
p1.side_points[SIDE_POSITIVE].prev - p1.position,
p1.side_points[SIDE_POSITIVE].prev_vertex,
p1.side_points[SIDE_NEGATIVE].prev_vertex,
v,
options,
false,
vertex,
attributes,
output,
)?;
}

@nical nical added the bug label May 21, 2024
@nical
Copy link
Owner

nical commented May 21, 2024

Thanks for filing this. Indeed the handling of Square end caps is missing for some reason.

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

Successfully merging a pull request may close this issue.

2 participants