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

Line algorithm #1944

dacap opened this issue Dec 5, 2018 · 0 comments

Line algorithm #1944

dacap opened this issue Dec 5, 2018 · 0 comments


Copy link

@dacap dacap commented Dec 5, 2018

We have two different issues that we want to solve with a line algorithm:

A. Pixel-perfect line mode (#1395, #1641), and
B. Straight lines are a bit off (#1894)

The first bug is related to the possibility to create straight lines with perfect angles for pixel-art, and the second bug is related to that the new line algorithm doesn't work to make continue lines (which is the most common case to be fixed).

A possible line algorithm that merges both approaches shows some undesirable results too:


The bad thing is that when we switches the common algorithm (for continuous lines) to a perfect pixel block lines algorithm, the line is too different.

One possible solution would be to use the perfect pixel line algorithm only in some special cases:

  1. When the snap angle modifier is pressed: Shift key in Line tool, and Ctrl modifier when Pencil+Shift key is used to draw straight lines
  2. When the snap to grid is enabled (which it makes sense to create perfect lines that match the grid tiles)

In other case we'll use the regular algorithm that fits continuous lines as in

@dacap dacap added the sprite editor label Dec 5, 2018
@dacap dacap added this to the v1.2 milestone Dec 5, 2018
@dacap dacap self-assigned this Dec 5, 2018
@dacap dacap closed this in 7c2038e Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant