This is new wiki software and old wiki content. It's a work in progress!
Here's the explanation.
Be gentle, report bugs, leave feedback on pages, or just edit them yourself! Thanks!

SDL Wiki

SDL_RenderWindowToLogical

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

Syntax

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

Function Parameters

renderer

the renderer from which the logical coordinates should be calcualted

windowX

the real X coordinate in the window

windowY

the real Y coordinate in the window

logicalX

the pointer filled with the logical x coordinate

logicalY

the pointer filled with the logical y coordinate

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.

SDL_RenderGetScale
SDL_RenderSetScale
SDL_RenderGetLogicalSize
SDL_RenderSetLogicalSize

CategoryAPI


[ 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.