title: SDL Draw Rect after Line Pixel issue
body: <p>When I draw in SDL a rectangle after a line I got a pixel colored like the Line, on top of the right top corner of the rectangle. It doesn't matter if the line and the rectangle have a different color. There is always a pixel on the right top corner of the rectangle when I draw the rectangle after the line.</p>
  <p>Here is my code for the rectangle:</p>
  <pre><code>SDL_Rect srcrect;
  
  srcrect.x = 50;
  srcrect.y = 50;
  srcrect.w = 150;
  srcrect.h = 80;
  </code></pre>
  <p>Here is my code were I drawing it:</p>
  <pre><code>SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE);
  SDL_RenderClear(renderer);
  
  SDL_SetRenderDrawColor(renderer, 255, 255, 255, SDL_ALPHA_OPAQUE);
  SDL_RenderDrawLine(renderer, 20, 20, 300, 300);
  SDL_SetRenderDrawColor(renderer, 255, 0, 255, SDL_ALPHA_OPAQUE);
  SDL_RenderDrawRect(renderer, &amp;srcrect);
      
  SDL_RenderPresent(renderer);
  </code></pre>
  <p>Here is a picture of the whole render:</p>
  <p><a href="https://i.stack.imgur.com/yGqyd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yGqyd.png" alt="Full Render" /></a></p>
  <p>Here is a picture zoomed in on the top right corner of the rectangle:</p>
  <p><a href="https://i.stack.imgur.com/ejrmD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ejrmD.png" alt="Top Right Corner" /></a></p>
  <p>When I draw draw the rectangle before the line I don't have this issue.<br />
  Does anyone have an idea why this happens?</p>
  <p><strong>Edit:</strong></p>
  <p>When I draw a second rectangle there is no pixel issue on this rectangle. It's only on the first rectangle after the line.</p>
  <p><strong>Edit 2:</strong></p>
  <p>I found a post about the exact same problem. There is also just the solution with the <code>SDL_CreateSoftwareRenderer()</code>. Here is the link:
  <a href="https://stackoverflow.com/questions/58826191/what-could-be-causing-stray-pixels-to-appear-in-my-sdl2-program">What could be causing stray pixels to appear in my SDL2 program?</a></p>