diff options
author | Diego Perez <diegoperez@google.com> | 2015-06-15 09:50:58 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-06-15 09:50:58 +0000 |
commit | 13c06d6c91e67962b7ffdf92c56e3b01125e4a8d (patch) | |
tree | 182ce023d15eb578c4082cdd7b0779fbb8a11f21 /tools/layoutlib | |
parent | 2422011d867f4d4516605148641bbeb7d9c2501b (diff) | |
parent | 1f33bdad98dd5138f887642d39c9495e1d7df14b (diff) | |
download | frameworks_base-13c06d6c91e67962b7ffdf92c56e3b01125e4a8d.zip frameworks_base-13c06d6c91e67962b7ffdf92c56e3b01125e4a8d.tar.gz frameworks_base-13c06d6c91e67962b7ffdf92c56e3b01125e4a8d.tar.bz2 |
am 1f33bdad: am 5e50e00c: Merge "Fix for shadows on theme editor" into lmp-mr1-dev
* commit '1f33bdad98dd5138f887642d39c9495e1d7df14b':
Fix for shadows on theme editor
Diffstat (limited to 'tools/layoutlib')
-rw-r--r-- | tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java | 4 | ||||
-rw-r--r-- | tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java index 703719c..cbc30c3 100644 --- a/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java @@ -23,6 +23,8 @@ import com.android.tools.layoutlib.annotations.LayoutlibDelegate; import android.graphics.Shader.TileMode; +import java.awt.image.ColorModel; + /** * Delegate implementing the native methods of android.graphics.LinearGradient * @@ -158,7 +160,7 @@ public final class LinearGradient_Delegate extends Gradient_Delegate { java.awt.image.ColorModel colorModel) { mCanvasMatrix = canvasMatrix; mLocalMatrix = localMatrix; - mColorModel = colorModel; + mColorModel = colorModel.hasAlpha() ? colorModel : ColorModel.getRGBdefault(); } @Override diff --git a/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java index 6edb140..750580b 100644 --- a/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java @@ -23,6 +23,8 @@ import com.android.tools.layoutlib.annotations.LayoutlibDelegate; import android.graphics.Shader.TileMode; +import java.awt.image.ColorModel; + /** * Delegate implementing the native methods of android.graphics.RadialGradient * @@ -146,7 +148,7 @@ public class RadialGradient_Delegate extends Gradient_Delegate { java.awt.image.ColorModel colorModel) { mCanvasMatrix = canvasMatrix; mLocalMatrix = localMatrix; - mColorModel = colorModel; + mColorModel = colorModel.hasAlpha() ? colorModel : ColorModel.getRGBdefault(); } @Override |