Graphic coordinates in Juce

When I draw any figure to the screen, it is displayed on the screen actually 25% more in pixels.

This happens with any commands: drawLine, fillRect, setSize and others.


Windows 7

Perhaps you have a global scale factor set? You can see this by calling Desktop::getInstance().getGlobalScaleFactor() and can set it via Desktop::getInstance().setGlobalScaleFactor().

You could also


in your AppConfig.h file

which will discard whatever scaling Windows is trying to do and will plainly 1:1 map logical pixels to physical pixels

Thank you! It returns 1.25. But i never set it.

I’ll try. Thank you!

It’s in the Control Panel of Windows (don’t remember exactly where): there is a setting for drawing native controls at a bigger (or smaller) size. It defaults to 125% (at least on high DPI monitors) so that controls are rendered with a reasonable size and not too small as they would be if they were with 1:1 scale.