Revert D7569885: Fix anti aliasing rounded background

Differential Revision:
D7569885

Original commit changeset: 4bfb00485211

fbshipit-source-id: 2fc76ca8615d5562ebe8c7527e9a54058b8d82dc
This commit is contained in:
Andrew Chen (Eng) 2018-04-17 10:13:52 -07:00 committed by Facebook Github Bot
parent 1433d15557
commit e4f88c66e3
1 changed files with 84 additions and 103 deletions

View File

@ -343,23 +343,6 @@ public class ReactViewBackgroundDrawable extends Drawable {
|| borderWidth.bottom > 0
|| borderWidth.left > 0
|| borderWidth.right > 0) {
//If it's a full and even border draw inner rect path with stroke
final float fullBorderWidth = getFullBorderWidth();
if (borderWidth.top == fullBorderWidth &&
borderWidth.bottom == fullBorderWidth &&
borderWidth.left == fullBorderWidth &&
borderWidth.right == fullBorderWidth) {
if (fullBorderWidth > 0) {
int borderColor = getBorderColor(Spacing.ALL);
mPaint.setColor(ColorUtil.multiplyColorAlpha(borderColor, mAlpha));
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeWidth(fullBorderWidth);
canvas.drawPath(mInnerClipPathForBorderRadius, mPaint);
}
}
//In the case of uneven border widths/colors draw quadrilateral in each direction
else {
mPaint.setStyle(Paint.Style.FILL);
// Draw border
@ -396,10 +379,8 @@ public class ReactViewBackgroundDrawable extends Drawable {
final boolean isColorStartDefined = isBorderColorDefined(Spacing.START);
final boolean isColorEndDefined = isBorderColorDefined(Spacing.END);
final boolean isDirectionAwareColorLeftDefined =
isRTL ? isColorEndDefined : isColorStartDefined;
final boolean isDirectionAwareColorRightDefined =
isRTL ? isColorStartDefined : isColorEndDefined;
final boolean isDirectionAwareColorLeftDefined = isRTL ? isColorEndDefined : isColorStartDefined;
final boolean isDirectionAwareColorRightDefined = isRTL ? isColorStartDefined : isColorEndDefined;
if (isDirectionAwareColorLeftDefined) {
colorLeft = directionAwareColorLeft;
@ -468,7 +449,7 @@ public class ReactViewBackgroundDrawable extends Drawable {
drawQuadrilateral(canvas, colorBottom, x1, y1, x2, y2, x3, y3, x4, y4);
}
}
}
canvas.restore();
}