Rect corner radius issue. Squircles!?

Hi EliTheiceMan,

Good question!

If you look at the way they draw rounded rectangle, they use quadraticVertex():

So they are using bezier curves to draw the rounded edges. And the way they are using the bezier curves is by putting the control points on the corner of the rectangle like so:

RoundedRect

The thing is that you can’t draw a perfect circle with bezier curves so you’ll never get perfect circles with this method.

Although there might be a way to make it appears a bit more like a circle by putting the control point in a very specific place.

2 Likes