logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_SetRenderScale - Set the drawing scale for rendering on the current target.

Availability

       This function is available since SDL 3.2.0.

Description

       The  drawing coordinates are scaled by the x/y scaling factors before they are used by the renderer. This
       allows resolution independent drawing with a single coordinate system.

       If this results in scaling or subpixel drawing by the rendering backend, it will  be  handled  using  the
       appropriate quality hints. For best results use integer scaling factors.

       Each render target has its own scale. This function sets the scale for the current render target.

Function Parameters

renderer
              the rendering context.

       scaleX the horizontal scaling factor.

       scaleY the vertical scaling factor.

Name

       SDL_SetRenderScale - Set the drawing scale for rendering on the current target.

Return Value

       for more information.

See Also

SDL_GetRenderScale(3)

Simple Directmedia Layer                           SDL 3.2.20                              SDL_SetRenderScale(3)

Synopsis

#include<SDL3/SDL_render.h>boolSDL_SetRenderScale(SDL_Renderer*renderer,floatscaleX,floatscaleY);

Thread Safety

       This function should only be called on the main thread.

See Also