Device pixels per window coordinate unit; window sizes here are already in pixels.
window := create_window(800, 600, "scale");
pixels := cast(int) (800 * get_pixel_scale(window));This one is only checked to compile, not run.
get_pixel_scale :: (win: Window) -> float
Parameters
- win: Window
Returns
- float
get_pixel_scale :: (hwnd: Windows.HWND) -> float
Parameters
- hwnd: Windows.HWND
Returns
- float
get_pixel_scale :: (window: *ObjC.NSWindow) -> float
Device pixels per window coordinate unit: 2 on a Retina display, 1 elsewhere.
Parameters
- window: *ObjC.NSWindow
Returns
- float
window := create_window(800, 600, "scale");
pixels := cast(int) (800 * get_pixel_scale(window));This one is only checked to compile, not run.