Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9fcd581a authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I4e03999c into eclair

* changes:
  if we have a single value for roundrect radius, manually clamp it before drawing.
parents 2df1cc43 4e03999c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -319,7 +319,16 @@ public class GradientDrawable extends Drawable {
                    }
                }
                else {
                    // since the caller is only giving us 1 value, we will force
                    // it to be square if the rect is too small in one dimension
                    // to show it. If we did nothing, Skia would clamp the rad
                    // independently along each axis, giving us a thin ellips
                    // if the rect were very wide but not very tall
                    float rad = st.mRadius;
                    float r = Math.min(mRect.width(), mRect.height()) * 0.5f;
                    if (rad > r) {
                        rad = r;
                    }
                    canvas.drawRoundRect(mRect, rad, rad, mFillPaint);
                    if (haveStroke) {
                        canvas.drawRoundRect(mRect, rad, rad, mStrokePaint);