Get logical coordinates of point in renderer when given real coordinates of point in window.
void SDL_RenderWindowToLogical(SDL_Renderer * renderer,
int windowX, int windowY,
float *logicalX, float *logicalY);
renderer |
the renderer from which the logical coordinates should be calculated |
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 |
Logical coordinates will differ from real coordinates when render is scaled and logical renderer size set
This function is available since SDL 2.0.18.