Call setShader after setLocalMatrix.

After updating a Shader's Matrix, set the Shader on the Paint again,
so it will take effect.

BUG:14315916
Change-Id: Ibf732f7f417d2a52500fabf4d660be7fcfb59f43
This commit is contained in:
Leon Scroggins III
2014-07-09 17:06:34 -04:00
parent ba188a67c3
commit c7095947cb
2 changed files with 2 additions and 0 deletions

View File

@@ -60,6 +60,7 @@ public class Sweep extends GraphicsActivity {
mMatrix.setRotate(mRotate, x, y);
mShader.setLocalMatrix(mMatrix);
mPaint.setShader(mShader);
mRotate += 3;
if (mRotate >= 360) {
mRotate = 0;

View File

@@ -477,6 +477,7 @@ public class FoldingLayout extends ViewGroup {
mShadowGradientMatrix.setScale(1, mFoldDrawHeight);
mShadowLinearGradient.setLocalMatrix(mShadowGradientMatrix);
}
mGradientShadow.setShader(mShadowLinearGradient);
mGradientShadow.setAlpha(alpha);
}