SDL_RenderCoordinatesToWindow

Get a point in window coordinates when given a point in render 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_RenderCoordinatesToWindow
(,
float x
,
float y
,
float* window_x
,
float* window_y
)

Parameters

renderer SDL_Renderer*

The rendering context.

x float

The x coordinate in render coordinates.

y float

The y coordinate in render coordinates.

window_x float*

A pointer filled with the x coordinate in window coordinates.

window_y float*

A pointer filled with the y coordinate in window 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