Why are there two values for single corner radius in GradientDrawable.setCornerRadii for?

60 Views Asked by At

From android docs, the GradientDrawable.setCornerRadii (float[] radii) method:

Specifies radii for each of the 4 corners. For each corner, the array contains 2 values

Why are there 2 values for each corner? What is the meaning of two values for a single corner?

1

There are 1 best solutions below

0
On

One value is for the X_radius the other for the Y_Radius. If they are equal you'll get an even radius. If they are different it will be distorted in one dimension or the other (look more like a logarithmic curve for example).