# What is the radii argument for rectangles?

**URL:** <https://discourse.processing.org/t/what-is-the-radii-argument-for-rectangles/9129>\
**Category:** Beginners\
**Created:** [March 8, 2019, 11:47pm UTC](https://discourse.processing.org/t/what-is-the-radii-argument-for-rectangles/9129 "2019-03-08T23:47:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkxxbdm](https://avatars.discourse-cdn.com/v4/letter/k/b5a626/32.png) [@kkxxbdm](https://discourse.processing.org/u/kkxxbdm)\
**Post date:** [March 8, 2019, 11:47pm UTC](https://discourse.processing.org/t/what-is-the-radii-argument-for-rectangles/9129/1 "2019-03-08T23:47:17Z")

</div>

```auto
rectMode(CENTER);
rect(0, 0, s*xscale, s*yscale, 7); 
/// 0: x-coordinate, 0: y-coordinate, s*xscale: width, s*yscale: height, 7: the radii for all four corner

```

How to understand that 7 is the radii for all four corners of the rectangle? Any comments are greatly appreciated.

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [March 9, 2019, 1:09am UTC](https://discourse.processing.org/t/what-is-the-radii-argument-for-rectangles/9129/2 "2019-03-09T01:09:54Z")

</div>

pls first look up a command  
like in this online reference  
[https://processing.org/reference/rect\_.html](https://processing.org/reference/rect_.html)

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [March 9, 2019, 9:09am UTC](https://discourse.processing.org/t/what-is-the-radii-argument-for-rectangles/9129/3 "2019-03-09T09:09:34Z")

</div>

The corners are round (optional)

The degree of the roundness is 7
