32 SDL_Rect transformed = *rect;
37 transformed.x *= scale;
38 transformed.y *= scale;
39 transformed.w *= scale;
40 transformed.h *= scale;
42 transformed.y = dh - transformed.h - transformed.y;
49 window = window ?: SDL_GL_GetCurrentWindow();
53 SDL_GetWindowSize(window, NULL, &h);
62 SDL_GL_GetDrawableSize(window, NULL, &dh);
69 return dh / (double) h;
SDL_Rect MVC_TransformToWindow(SDL_Window *window, const SDL_Rect *rect)
Transforms the specified rectangle to normalized device coordinates in window.
double MVC_WindowScale(SDL_Window *window, int *height, int *drawableHeight)
Resolves the scale factor of the specified window for High-DPI support.