@@ -478,6 +478,9 @@ of the fill (if any) without worrying about blending artifacts.
478478 mFillPaint .setAlpha (currFillAlpha );
479479 mFillPaint .setDither (mDither );
480480 mFillPaint .setColorFilter (mColorFilter );
481+ if (mColorFilter != null && !mGradientState .mHasSolidColor ) {
482+ mFillPaint .setColor (0xff000000 );
483+ }
481484 if (haveStroke ) {
482485 mStrokePaint .setAlpha (currStrokeAlpha );
483486 mStrokePaint .setDither (mDither );
@@ -739,6 +742,9 @@ private boolean ensureValidRect() {
739742
740743 mFillPaint .setShader (new LinearGradient (x0 , y0 , x1 , y1 ,
741744 colors , st .mPositions , Shader .TileMode .CLAMP ));
745+ if (!mGradientState .mHasSolidColor ) {
746+ mFillPaint .setColor (0xff000000 );
747+ }
742748 } else if (st .mGradient == RADIAL_GRADIENT ) {
743749 x0 = r .left + (r .right - r .left ) * st .mCenterX ;
744750 y0 = r .top + (r .bottom - r .top ) * st .mCenterY ;
@@ -748,6 +754,9 @@ private boolean ensureValidRect() {
748754 mFillPaint .setShader (new RadialGradient (x0 , y0 ,
749755 level * st .mGradientRadius , colors , null ,
750756 Shader .TileMode .CLAMP ));
757+ if (!mGradientState .mHasSolidColor ) {
758+ mFillPaint .setColor (0xff000000 );
759+ }
751760 } else if (st .mGradient == SWEEP_GRADIENT ) {
752761 x0 = r .left + (r .right - r .left ) * st .mCenterX ;
753762 y0 = r .top + (r .bottom - r .top ) * st .mCenterY ;
@@ -778,6 +787,9 @@ private boolean ensureValidRect() {
778787
779788 }
780789 mFillPaint .setShader (new SweepGradient (x0 , y0 , tempColors , tempPositions ));
790+ if (!mGradientState .mHasSolidColor ) {
791+ mFillPaint .setColor (0xff000000 );
792+ }
781793 }
782794 }
783795 }
0 commit comments