From 39c512b623eff1d7a7b17f68a42723fbda9bf483 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Wed, 23 Feb 2011 11:21:39 -0800 Subject: [PATCH] Don't swap bottom left and bottom right corner radii. Change-Id: If57b6627f67998edc384de15e3d970f8edf18211 --- graphics/java/android/graphics/BitmapFactory.java | 2 +- .../java/android/graphics/drawable/GradientDrawable.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/graphics/java/android/graphics/BitmapFactory.java b/graphics/java/android/graphics/BitmapFactory.java index cffee5fd4e9c0..8d1756152eca8 100644 --- a/graphics/java/android/graphics/BitmapFactory.java +++ b/graphics/java/android/graphics/BitmapFactory.java @@ -240,7 +240,7 @@ public class BitmapFactory { /** * The resulting height of the bitmap, set independent of the state of * inJustDecodeBounds. However, if there is an error trying to decode, - * outHeight will be set to -1. + * outHeight will be set to -1. */ public int outHeight; diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java index 65c6ccfa25d76..2089751996228 100644 --- a/graphics/java/android/graphics/drawable/GradientDrawable.java +++ b/graphics/java/android/graphics/drawable/GradientDrawable.java @@ -811,11 +811,12 @@ public class GradientDrawable extends Drawable { com.android.internal.R.styleable.DrawableCorners_bottomRightRadius, radius); if (topLeftRadius != radius || topRightRadius != radius || bottomLeftRadius != radius || bottomRightRadius != radius) { + // The corner radii are specified in clockwise order (see Path.addRoundRect()) setCornerRadii(new float[] { topLeftRadius, topLeftRadius, topRightRadius, topRightRadius, - bottomLeftRadius, bottomLeftRadius, - bottomRightRadius, bottomRightRadius + bottomRightRadius, bottomRightRadius, + bottomLeftRadius, bottomLeftRadius }); } a.recycle();