We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5050 - SDL_RenderDrawLine draws extra pixels at start and end of line
Summary: SDL_RenderDrawLine draws extra pixels at start and end of line
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: 2.0.10
Hardware: x86_64 Linux
: P2 major
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.16
Depends on:
Blocks:
 
Reported: 2020-03-21 21:36 UTC by William Cleveland
Modified: 2020-07-16 18:29 UTC (History)
0 users

See Also:


Attachments
A simple demo of the issue. (3.02 KB, text/x-c++src)
2020-03-21 21:36 UTC, William Cleveland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description William Cleveland 2020-03-21 21:36:57 UTC
Created attachment 4274 [details]
A simple demo of the issue.

SDL_RenderDrawLine draws extra pixels at the end points when the line is drawn from the 2nd to 4th quadrants. A quadrant reference is as:

                |
           3    |   2
                |
       -------------------
                |
           4    |   1
                |

I think my issue is related to:

https://bugzilla.libsdl.org/show_bug.cgi?id=2796
https://bugzilla.libsdl.org/show_bug.cgi?id=2711

The pixels always appear towards the 3rd quadrant side of the line.

I have attached a simple program that shows the issue in real time. Just click and draw and you will see two white pixels appear whenever the line is being drawn from quadrants 2 to 4.

The program will show a yellow line that has the issue, and it is reproducible--live.

My system is:
Intel® Core™ i5-9600K CPU @ 3.70GHz × 6
Radeon 550 Series (POLARIS12, DRM 3.33.0, 5.3.0-7642-generic, LLVM 9.0.0)
GNOME 3.34.2