SDL Wiki
(This is the legacy documentation for SDL2, the previous stable version; SDL3 is the current stable version.)

SDL_RenderLogicalToWindow

Get real coordinates of point in window when given logical coordinates of point in renderer.

Header File

Defined in SDL_render.h

Syntax

void SDL_RenderLogicalToWindow(SDL_Renderer * renderer, 
                                    float logicalX, float logicalY,
                                    int *windowX, int *windowY);

Function Parameters

SDL_Renderer * renderer the renderer from which the window coordinates should be calculated.
float logicalX the logical x coordinate.
float logicalY the logical y coordinate.
int * windowX the pointer filled with the real X coordinate in the window.
int * windowY the pointer filled with the real Y coordinate in the window.

Remarks

Logical coordinates will differ from real coordinates when render is scaled and logical renderer size set

Version

This function is available since SDL 2.0.18.

See Also


CategoryAPI, CategoryAPIFunction, CategoryRender


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.