After many years with Processing IDE, I missed Intellij IDEA too much so I went back for it but Processing stays on
However, the shapes drawn are way less sharp than in the real PDE, for example, a simple circle is rendered differently using both time the latest version of Processing available 4.1.2, the same PC and the same monitor :
In PDE :
public void setup() {
size(500, 500);
}
public void draw() {
background(40);
noStroke();
fill(255);
circle(width/2, height/2, 400);
saveFrame("./PDE.png");
noLoop();
}
and the result is :
In Intellij IDEA :
import processing.core.PApplet;
public class Main extends PApplet {
public void settings() {
size(500, 500);
}
public void draw() {
background(40);
noStroke();
fill(255);
circle(width/2, height/2, 400);
saveFrame("Intellij IDEA.png");
noLoop();
}
public static void main(String... args) {
Main pt = new Main();
PApplet.runSketch(new String[]{"testRendering"}, pt);
}
}
and the result is :
When I save the frame it is exactly the same output, however, on the simulation, the circle looks like this :
If you are using the same code then both white circles are 100 pixels radius. If both IDEs are running on the same computer and using the same monitor how come the screen captured images are visually different sizes? Being ācaptured by handā should not make a difference to the image sizes.
Are you using the same version of Processing with Intellij IDEA ?
Are you using P2D/P3D or the default renderer (JAVA2D)?
Perhaps you could post the entire sketch code since it is so short.
Thank you for your answer !
The problem I have is with Java not Python and it is in Intellij IDEA: my parameters of the Processing IDE seem to work since I want to get the same rendering with Intellij IDEA.
Iāll look into pixelDensity(), thank you again !
Your original pictures (now edited) looked similar to what I experienced with the Python modeā¦ sometimes these issues can be related and help in finding a solution.
If you can send me a quick reference to get me up and running with Intellij IDEA and Processing 4.1.2 I will try this.
I installed IntelliJ IDEA Community Edition 2022.3.2
Inside your new Java Project, juste make Ctrl + Alt + Shift + S to go into the project structure.
You need to setup Java 17 as SDK (I have the coretto version) and add the core/library folder of your processing installation in the Libraries tab.
Once youāve done the config, juste make your main class extends PApplet from processing.core
And you can copy paste my code.
For the run configuration : use Java 17 and put the name of your main class and you should be good to go !
It is so weird, the difference is very big with my PCā¦
Btw, where did you find the āadvanced scaling settingsā in Windows ? I canāt find it (my Windows is in French so just searching it in the search bar isnāt workingā¦).
The only thing I found was a drop down menu of different scalings : (in Settings/Screen)
Thank you for your help on this, if I scale down from 125% to 100% everything works fine !
I will still try to look for a way to keep my Windows on 125% scaling, Intellij on 100% without blurriness (I am too young to accept this for nowā¦maybe one day )
I came across this Processing issue which has many links to IntelliJ as well:
Some observations for my W10 Pro with 125% scaling:
Processing 3.5.4 in Java mode does not scale output
Processing 3.5.4 in Python mode does not scale output
Processing 4.1.2 in Java mode does not scale output
Processing 4.1.2 in Python mode does scale output
Output refers to sketch window.
I have not made notes on the UI being scaled as yet.
Understanding why the above behaves so may lead to a solution.
I donāt have an answer just yetā¦ just a lot of research so far.