The render window is scaled improperly when Windows display scale is set to greater than 100%

Hi. I have a QHD monitor (2560x1440), and I have my display scale set to 150% for readability. Unfortunately, in Python mode, the render window is also scaled up the same amount, making things very jagged. I didn’t realize the issue until comparing a test code in both Python and Java mode. When I switch it to 100% scale, they both render the same. Is this a bug? Is there code I can add to make it work properly? I’ve tested a lot and nothing seems to work. Thanks in advance.

3 Likes

I have exactly the same problem in windows 10, using the java version. Using processing 4.2 from the included editor works fine. Using the libraries from an external IDE (Netbeans) reproduces the same error.
Using Netbeans, the variables displayWidth and displayHeight are incorrectly calculated when the “layout and scale” windows setting is set to >100%, but are correctly computed from the Processing editor.

For example, in a 1920x1080 display, when layout and scale is set to 150%, the variables computed when running from netbeans are:
displayHeight: 720
displayWidth: 1280
that is, scaled 1/150%=75%.
and from the Processing editor are:
displayHeight: 1080
displayWidth: 1920 (both correct)
Both methods are using the same core.jar library. There seems to be a configuration tweak when calling from the Processing editor that I can’t find.

Hello @Metamere,

There is a related discussion here:

:)

1 Like