Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rather than trying to fix the existing algorithm I have migrated to a bresenham based triangle fill. This resolves all the weird rendering issues included the wide filled triangles at the 12:00 and 06:00 and makes the filled triangles identical to the non filled version.
I unfortunately had to make major changes to the line drawing to make it possible to draw 3 lines concurrently. I extracted the state of the line drawing to a struct to enable this. The triangle filling also requires that all lines are drawn in y++ direction so that we can step through each pixel this required significant changes to the logic.
These changes were much larger than I anticipated when I started down this path however the advantage of sharing the same line drawing algorithm seems worth it to me. so I thought I try a pull request.
If this isn't acceptable I can spend some more time working through the problems in the original algorithm.