From the short description of SDL_RenderSetScale() and SDL_RenderSetLogicalSize() on the SDL2 wiki I was under the impression that these commands scale the whole frame independent of its content, basically the way you would scale an image in a graphics editor.
And in my previous programs where I was only scaling and rendering SDL_Rects and SDL_Textures, that appeared to be the case. It is however only partially the case for drawing lines with RenderDrawLine().
The Line is scaled properly if it is parallel to either the x or y axis, but in any other case it is not scaled at all.
SDL_RenderSetScale( gRenderer, gScaler, gScaler );
SDL_SetRenderDrawColor( gRenderer, 0x00, 0x00, 0x00, 0xFF );
SDL_RenderClear( gRenderer );
SDL_SetRenderDrawColor( gRenderer, 0xFF, 0xFF, 0xFF, 0xFF );
SDL_RenderDrawLine( gRenderer, x1, y1, x2, y2 );
SDL_RenderPresent( gRenderer );
Is there a way to scale the line regardless of angle with SDL_RenderSetScale()? How does the function decide what to scale and what to ignore?