Rounded Rectangles in P2D

rounded rectangles in p2d are very weird, they arent how they are when used in javafx.

void setup() {
size(300,300,P2D);
}

void draw() {
background(255);
stroke(0);
fill(255);
rect(width/2-50,height/2-50,100,100,5);
}

I don’t know that I would call it “very weird”, but they are different. Change your curve radius to 25 to see the difference more clearly. In the default renderer, the curves are thicker than the straight lines. In P2D, the straight lines are thicker than the curves. To my eye, neither one of them is quite correct.

1 Like