Open ghost opened 6 years ago
Hi, thanks for reporting, I will need some more information.
If you go into display settings, what is your display scale? Do you have a custom scale or one from the dropdown (100%, 125%, 150%, ...)?
Do you run the sketch on integrated graphics card (intel) or dedicated (radeon/geforce)?
Is there anything unusual about your machine (multiple monitors, VR headset...)?
One of my students ran into a similar error on Windows 10. Screenshots below show what's going on.
The first thing I've checked is if the windows have the correct size with the default renderer and with the P3D renderer. This seems to be ok (see blue overlay).
In the P3D renderer, the red rectangle is drawn just behind the title bar. The area below the title bar is 800 x 600 pixels, as defined in size()
. When I measured the red rectangle, it is looks like the (0,0) coordinate is located at the top-left corner of the title bar.
Description
When drawing 2d objects origin and scaling in y-dimension behaves differently depending on the renderer used.
Expected Behaviour
An object drawn at (0,0) should always be drawn at the top left corner of the window. An object drawn at (width, height) should always be drawn at the bottom right corner.
Current Behaviour
Using the default or the FX2D renderer the behaviour is correct.
Using the P2D or the P3D renderer objects drawn at (0,0) are drawn outside the window above the top left corner. An object drawn at (width, height) is drawn a little under the bottom right corner. So both the origin and the scale are incorrect. I don't expect this behaviour to be pixel perfect, because this isn't possible with OpenGL renderers. But the offset is about 30 pixels, which is a lot.
Steps to Reproduce
My Environment
Processing version: 3.3.6 Operating system: Windows 10 Pro (Version 1703, build 15063.786)
Possible Causes / Solutions
Translating and scaling provides a workaround:
Translation and scaling values are from observations.