Project

General

Profile

Accessing browser's window object

Added by Michał Błaszak over 3 years ago

Is there a way to access the browser's window object to read it's properties?

In particular I'm interested to get window.devicePixelRatio to set canvas width and height so drawings become pixel sharp.


Replies (2)

RE: Accessing browser's window object - Added by Michał Błaszak over 3 years ago

Thank you, however it doesn't seem to be what I'm looking for.
In my Chrome window.devicePixelRatio gives 1.25
The Wt::WApplication::instance()->environment().dpiScale() gives 1 on the same browser.

    (1-2/2)