Hi guys. This change makes SDL_RenderDrawRect function broken:
I posted comment and screenshot there.
Hi guys. This change makes SDL_RenderDrawRect function broken:
I posted comment and screenshot there.
There is SDL_RenderDrawRect not rectangular Ā· Issue #4001 Ā· libsdl-org/SDL Ā· GitHub
I can also confirm this, im seeing the same on my end (linux, all gl renderers)
That change was bound to break the case when two or more lines are drawn (i.e. when count is greater than one) because it can move the start point of the last line segment (in order to force it to be plotted) but that is also the end point of the penultimate line segment, which as a result is drawn skewed!
Iām not entirely convinced that lengthening a line segment is the right approach to forcing both end points to be drawn. When Iāve wanted to do that in the past Iāve done it by appending an additional zero-length (or perhaps one-pixel length) segment.
I think, in on itself, lengthening a line within the ārulesā of opengl is fine. That is, moving the end point so far that the last point exits the pixel. Everything else however is probably going to break more than it fixes.
My understanding is that the previous version of the code did indeed move only the very last point (the end point of the last segment), but whilst that was āsafeā it didnāt have the desired effect of ensuring both end points were always plotted.
It seems to me that the best way of ensuring that an end point of a line is always plotted is to arrange that it is also the start point of another line (since it must be drawn as part of one or the other!). Hence my preference for appending an extra, short, segment.
This is buggy right now. Iām going to fight with this more once GitHub migration settles down. It feels a little like fixing one broken case breaks another, but itās clear the last fix I made to this, after 2.0.14 shipped, was straight-up goofy.
Tested the latest version and the OpenGL lines are sooo close to being right now - previous attempts have been a lot worse. Itās just that last line going backwards gets knocked down 1 pixel. At least they seem to be joining up at the same point now.
Sending positive vibes your way Ryan as I know this is your favourite thing to fix right now