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

Vertical lines are not drawn if y2<y1 #13

Open
udoschneider opened this issue Jun 16, 2022 · 0 comments · May be fixed by #15
Open

Vertical lines are not drawn if y2<y1 #13

udoschneider opened this issue Jun 16, 2022 · 0 comments · May be fixed by #15

Comments

@udoschneider
Copy link

The current OLED.Display.Impl.SSD1306.Draw.line_v/4 implementation doesn't work if the height (y2-y1) is negative. Although the implementation is similar for OLED.Display.Impl.SSD1306.Draw.line_h/4 it's not affected as x1 and x2 get sorted in line/6

udoschneider added a commit to udoschneider/oled that referenced this issue Jun 16, 2022
Fixes pappersverk#13, pappersverk#14

Replace general coordinate sorting with specific sorting for line_h/line_v.

Replace generic x-based line drawing with standard Bresenham drawing
which provides better results in all octants.
@udoschneider udoschneider linked a pull request Jun 16, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant