# Rounded Rectangles in P2D

**URL:** https://discourse.processing.org/t/rounded-rectangles-in-p2d/42422
**Category:** Beginners
**Created:** [July 14, 2023, 9:48pm UTC](https://discourse.processing.org/t/rounded-rectangles-in-p2d/42422 "2023-07-14T21:48:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nuhuhwy](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/nuhuhwy/32/18485_2.png) [@nuhuhwy](https://discourse.processing.org/u/nuhuhwy)
#### Post date: [July 14, 2023, 9:48pm UTC](https://discourse.processing.org/t/rounded-rectangles-in-p2d/42422/1 "2023-07-14T21:48:47Z")

</div>

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

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

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

```

---

<div class="post-metadata">

### Author: ![scudly](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/scudly/32/5597_2.png) [@scudly](https://discourse.processing.org/u/scudly)
#### Post date: [July 15, 2023, 3:07am UTC](https://discourse.processing.org/t/rounded-rectangles-in-p2d/42422/2 "2023-07-15T03:07:17Z")

</div>

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.
