SDL_RenderCoordinatesFromWindow

Get a point in render coordinates when given a point in window coordinates.

This takes into account several states:

- The window dimensions. - The logical presentation settings SDL_SetRenderLogicalPresentation - The scale SDL_SetRenderScale - The viewport SDL_SetRenderViewport

extern (C) nothrow @nogc extern
bool
SDL_RenderCoordinatesFromWindow
(,
float window_x
,
float window_y
,
float* x
,
float* y
)

Parameters

renderer SDL_Renderer*

The rendering context.

window_x float

The x coordinate in window coordinates.

window_y float

The y coordinate in window coordinates.

x float*

A pointer filled with the x coordinate in render coordinates.

y float*

A pointer filled with the y coordinate in render coordinates.

Return Value

Type: bool

true on success or false on failure; call SDL_GetError for more information.

Threadsafety: This function should only be called on the main thread.

See Also

Meta