CMM-22 / a3

0 stars 0 forks source link

Scaling issues on Windows, and a workaround #2

Open PierreSanson opened 2 years ago

PierreSanson commented 2 years ago

When trying to plot a point in the centre of the window, I realized that conversion from the [0,1] coordinates of the simulation to the screen coordinates was not working properly.

For instance I would have that kind of result when trying to display the particles within a square centered in the window: image I would for instance ask for a 600x600 window, but the debugger reported width and height of 900.

I found out that this came from a scaling that Windows applies to some displays. For instance, on my laptop, in Settings > System > Display > Scale and Layout, I had a 150% scaling factor. This can be fixed by adding a scaler to your app, and could then look something like that: image

liyuesolo commented 2 years ago

Thanks for sharing this information!