@@ -663,22 +663,30 @@ private void updatePath() {
663
663
mCenterDrawPath .addRoundRect (
664
664
mTempRectForCenterDrawPath ,
665
665
new float [] {
666
- Math .max (topLeftRadius - borderWidth .left * 0.5f ,
667
- (borderWidth .left > 0.0f ) ? (topLeftRadius / borderWidth .left ) : 0.0f ),
668
- Math .max (topLeftRadius - borderWidth .top * 0.5f ,
669
- (borderWidth .top > 0.0f ) ? (topLeftRadius / borderWidth .top ) : 0.0f ),
670
- Math .max (topRightRadius - borderWidth .right * 0.5f ,
671
- (borderWidth .right > 0.0f ) ? (topRightRadius / borderWidth .right ) : 0.0f ),
672
- Math .max (topRightRadius - borderWidth .top * 0.5f ,
673
- (borderWidth .top > 0.0f ) ? (topRightRadius / borderWidth .top ) : 0.0f ),
674
- Math .max (bottomRightRadius - borderWidth .right * 0.5f ,
675
- (borderWidth .right > 0.0f ) ? (bottomRightRadius / borderWidth .right ) : 0.0f ),
676
- Math .max (bottomRightRadius - borderWidth .bottom * 0.5f ,
677
- (borderWidth .bottom > 0.0f ) ? (bottomRightRadius / borderWidth .bottom ) : 0.0f ),
678
- Math .max (bottomLeftRadius - borderWidth .left * 0.5f ,
679
- (borderWidth .left > 0.0f ) ? (bottomLeftRadius / borderWidth .left ) : 0.0f ),
680
- Math .max (bottomLeftRadius - borderWidth .bottom * 0.5f ,
681
- (borderWidth .bottom > 0.0f ) ? (bottomLeftRadius / borderWidth .bottom ) : 0.0f )
666
+ Math .max (
667
+ topLeftRadius - borderWidth .left * 0.5f ,
668
+ (borderWidth .left > 0.0f ) ? (topLeftRadius / borderWidth .left ) : 0.0f ),
669
+ Math .max (
670
+ topLeftRadius - borderWidth .top * 0.5f ,
671
+ (borderWidth .top > 0.0f ) ? (topLeftRadius / borderWidth .top ) : 0.0f ),
672
+ Math .max (
673
+ topRightRadius - borderWidth .right * 0.5f ,
674
+ (borderWidth .right > 0.0f ) ? (topRightRadius / borderWidth .right ) : 0.0f ),
675
+ Math .max (
676
+ topRightRadius - borderWidth .top * 0.5f ,
677
+ (borderWidth .top > 0.0f ) ? (topRightRadius / borderWidth .top ) : 0.0f ),
678
+ Math .max (
679
+ bottomRightRadius - borderWidth .right * 0.5f ,
680
+ (borderWidth .right > 0.0f ) ? (bottomRightRadius / borderWidth .right ) : 0.0f ),
681
+ Math .max (
682
+ bottomRightRadius - borderWidth .bottom * 0.5f ,
683
+ (borderWidth .bottom > 0.0f ) ? (bottomRightRadius / borderWidth .bottom ) : 0.0f ),
684
+ Math .max (
685
+ bottomLeftRadius - borderWidth .left * 0.5f ,
686
+ (borderWidth .left > 0.0f ) ? (bottomLeftRadius / borderWidth .left ) : 0.0f ),
687
+ Math .max (
688
+ bottomLeftRadius - borderWidth .bottom * 0.5f ,
689
+ (borderWidth .bottom > 0.0f ) ? (bottomLeftRadius / borderWidth .bottom ) : 0.0f )
682
690
},
683
691
Path .Direction .CW );
684
692
@@ -1007,7 +1015,7 @@ private static int fastBorderCompatibleColorOrZero(
1007
1015
1008
1016
private void drawRectangularBackgroundWithBorders (Canvas canvas ) {
1009
1017
mPaint .setStyle (Paint .Style .FILL );
1010
-
1018
+
1011
1019
int useColor = ColorUtil .multiplyColorAlpha (mColor , mAlpha );
1012
1020
if (Color .alpha (useColor ) != 0 ) { // color is not transparent
1013
1021
mPaint .setColor (useColor );
0 commit comments