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:
@@ -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;
|
||||
|
||||
@@ -477,6 +477,7 @@ public class FoldingLayout extends ViewGroup {
|
||||
mShadowGradientMatrix.setScale(1, mFoldDrawHeight);
|
||||
mShadowLinearGradient.setLocalMatrix(mShadowGradientMatrix);
|
||||
}
|
||||
mGradientShadow.setShader(mShadowLinearGradient);
|
||||
|
||||
mGradientShadow.setAlpha(alpha);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user