Open
Description
Created by: clankill3r
The following code:
void setup() {
size(600, 600, JAVA2D);
pixelDensity(2);
println(screenX(600, 0));
}
prints out 1200.
If I change the pixelDensity to 1 it prints out 600.
For P2D and P3D it will always be 600, no matter the pixelDensity (like it should be).
I compared the screenXImpl
here are the results (not sure if this helps):
JAVA2D
with pixelDensity
1
JAVA2D
with pixelDensity
2
P2D
with pixelDensity
1
P2D
with pixelDensity
2
My first impression is that the pixelDensity 2 for JAVA2D is bit of a cheap hack. (But what do I know!).