Function sdl2_sys::SDL_RenderWindowToLogical

source ยท
pub unsafe extern "C" fn SDL_RenderWindowToLogical(
    renderer: *mut SDL_Renderer,
    windowX: c_int,
    windowY: c_int,
    logicalX: *mut f32,
    logicalY: *mut f32,
)
Expand description

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

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

\param renderer the renderer from which the logical coordinates should be calculated \param windowX the real X coordinate in the window \param windowY the real Y coordinate in the window \param logicalX the pointer filled with the logical x coordinate \param logicalY the pointer filled with the logical y coordinate

\since This function is available since SDL 2.0.18.

\sa SDL_RenderGetScale \sa SDL_RenderSetScale \sa SDL_RenderGetLogicalSize \sa SDL_RenderSetLogicalSize