summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2012-11-26 10:20:28 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-11-26 10:20:30 -0800
commita004ff880e103832af4ba069e7176c18b96b62d9 (patch)
tree15d2333d05db3a110f3362d0f7c9da1f43f0d82c /graphics
parent18bbcf7f688be41d858b2ac2dd51e7d86371aecb (diff)
parent813680780f365648b39873fa26dfae0123d51aed (diff)
downloadframeworks_base-a004ff880e103832af4ba069e7176c18b96b62d9.zip
frameworks_base-a004ff880e103832af4ba069e7176c18b96b62d9.tar.gz
frameworks_base-a004ff880e103832af4ba069e7176c18b96b62d9.tar.bz2
Merge "Use correct alpha value when a color is not set on a GradientDrawable." into jb-mr1.1-dev
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/drawable/GradientDrawable.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java
index 0623a9e..b966bb4 100644
--- a/graphics/java/android/graphics/drawable/GradientDrawable.java
+++ b/graphics/java/android/graphics/drawable/GradientDrawable.java
@@ -479,7 +479,7 @@ public class GradientDrawable extends Drawable {
mFillPaint.setDither(mDither);
mFillPaint.setColorFilter(mColorFilter);
if (mColorFilter != null && !mGradientState.mHasSolidColor) {
- mFillPaint.setColor(0xff000000);
+ mFillPaint.setColor(mAlpha << 24);
}
if (haveStroke) {
mStrokePaint.setAlpha(currStrokeAlpha);
@@ -743,7 +743,7 @@ public class GradientDrawable extends Drawable {
mFillPaint.setShader(new LinearGradient(x0, y0, x1, y1,
colors, st.mPositions, Shader.TileMode.CLAMP));
if (!mGradientState.mHasSolidColor) {
- mFillPaint.setColor(0xff000000);
+ mFillPaint.setColor(mAlpha << 24);
}
} else if (st.mGradient == RADIAL_GRADIENT) {
x0 = r.left + (r.right - r.left) * st.mCenterX;
@@ -755,7 +755,7 @@ public class GradientDrawable extends Drawable {
level * st.mGradientRadius, colors, null,
Shader.TileMode.CLAMP));
if (!mGradientState.mHasSolidColor) {
- mFillPaint.setColor(0xff000000);
+ mFillPaint.setColor(mAlpha << 24);
}
} else if (st.mGradient == SWEEP_GRADIENT) {
x0 = r.left + (r.right - r.left) * st.mCenterX;
@@ -788,7 +788,7 @@ public class GradientDrawable extends Drawable {
}
mFillPaint.setShader(new SweepGradient(x0, y0, tempColors, tempPositions));
if (!mGradientState.mHasSolidColor) {
- mFillPaint.setColor(0xff000000);
+ mFillPaint.setColor(mAlpha << 24);
}
}
}