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

Spikes when large line is used #16

Open
alepez opened this issue May 22, 2023 · 2 comments
Open

Spikes when large line is used #16

alepez opened this issue May 22, 2023 · 2 comments

Comments

@alepez
Copy link
Owner

alepez commented May 22, 2023

Describe the bug
When the line width is large, little cursor movements generate spikes.

To Reproduce

  1. Select maximum line width
  2. keep pressing, do small movements

Expected behavior

A roundish shape should be drawn.

Instead, these spikes appear on the screen:

image

@patowen
Copy link

patowen commented Apr 13, 2024

There is some extra context semi-related to this issue that might be useful:

If the code is modified to ensure that every stroke is configured with LineJoin::Round and LineCap::Round, the lines will generally look more like they have been drawn with a circular brush (with a potential performance cost due to the extra triangles needed for that roundness).

However, even with a round brushstroke, spikes can still appear, and I believe the root cause there is nical/lyon#891. One workaround is to split the path whenever that issue would come up, although I haven't tested if that would tank performance.

@alepez
Copy link
Owner Author

alepez commented Apr 15, 2024

Thanks for finding out the root cause! I'll probably implement the workaround you have suggested.

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

2 participants