mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Daily arc lint --take GOOGLEJAVAFORMAT
Reviewed By: zertosh Differential Revision: D21154707 fbshipit-source-id: 11956915c265f98e286638b91d66d51545e3a311
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a136b34c35
commit
19658a1a60
+25
-17
@@ -663,22 +663,30 @@ public class ReactViewBackgroundDrawable extends Drawable {
|
||||
mCenterDrawPath.addRoundRect(
|
||||
mTempRectForCenterDrawPath,
|
||||
new float[] {
|
||||
Math.max(topLeftRadius - borderWidth.left * 0.5f,
|
||||
(borderWidth.left > 0.0f) ? (topLeftRadius / borderWidth.left) : 0.0f),
|
||||
Math.max(topLeftRadius - borderWidth.top * 0.5f,
|
||||
(borderWidth.top > 0.0f) ? (topLeftRadius / borderWidth.top) : 0.0f),
|
||||
Math.max(topRightRadius - borderWidth.right * 0.5f,
|
||||
(borderWidth.right > 0.0f) ? (topRightRadius / borderWidth.right) : 0.0f),
|
||||
Math.max(topRightRadius - borderWidth.top * 0.5f,
|
||||
(borderWidth.top > 0.0f) ? (topRightRadius / borderWidth.top) : 0.0f),
|
||||
Math.max(bottomRightRadius - borderWidth.right * 0.5f,
|
||||
(borderWidth.right > 0.0f) ? (bottomRightRadius / borderWidth.right) : 0.0f),
|
||||
Math.max(bottomRightRadius - borderWidth.bottom * 0.5f,
|
||||
(borderWidth.bottom > 0.0f) ? (bottomRightRadius / borderWidth.bottom) : 0.0f),
|
||||
Math.max(bottomLeftRadius - borderWidth.left * 0.5f,
|
||||
(borderWidth.left > 0.0f) ? (bottomLeftRadius / borderWidth.left) : 0.0f),
|
||||
Math.max(bottomLeftRadius - borderWidth.bottom * 0.5f,
|
||||
(borderWidth.bottom > 0.0f) ? (bottomLeftRadius / borderWidth.bottom) : 0.0f)
|
||||
Math.max(
|
||||
topLeftRadius - borderWidth.left * 0.5f,
|
||||
(borderWidth.left > 0.0f) ? (topLeftRadius / borderWidth.left) : 0.0f),
|
||||
Math.max(
|
||||
topLeftRadius - borderWidth.top * 0.5f,
|
||||
(borderWidth.top > 0.0f) ? (topLeftRadius / borderWidth.top) : 0.0f),
|
||||
Math.max(
|
||||
topRightRadius - borderWidth.right * 0.5f,
|
||||
(borderWidth.right > 0.0f) ? (topRightRadius / borderWidth.right) : 0.0f),
|
||||
Math.max(
|
||||
topRightRadius - borderWidth.top * 0.5f,
|
||||
(borderWidth.top > 0.0f) ? (topRightRadius / borderWidth.top) : 0.0f),
|
||||
Math.max(
|
||||
bottomRightRadius - borderWidth.right * 0.5f,
|
||||
(borderWidth.right > 0.0f) ? (bottomRightRadius / borderWidth.right) : 0.0f),
|
||||
Math.max(
|
||||
bottomRightRadius - borderWidth.bottom * 0.5f,
|
||||
(borderWidth.bottom > 0.0f) ? (bottomRightRadius / borderWidth.bottom) : 0.0f),
|
||||
Math.max(
|
||||
bottomLeftRadius - borderWidth.left * 0.5f,
|
||||
(borderWidth.left > 0.0f) ? (bottomLeftRadius / borderWidth.left) : 0.0f),
|
||||
Math.max(
|
||||
bottomLeftRadius - borderWidth.bottom * 0.5f,
|
||||
(borderWidth.bottom > 0.0f) ? (bottomLeftRadius / borderWidth.bottom) : 0.0f)
|
||||
},
|
||||
Path.Direction.CW);
|
||||
|
||||
@@ -1007,7 +1015,7 @@ public class ReactViewBackgroundDrawable extends Drawable {
|
||||
|
||||
private void drawRectangularBackgroundWithBorders(Canvas canvas) {
|
||||
mPaint.setStyle(Paint.Style.FILL);
|
||||
|
||||
|
||||
int useColor = ColorUtil.multiplyColorAlpha(mColor, mAlpha);
|
||||
if (Color.alpha(useColor) != 0) { // color is not transparent
|
||||
mPaint.setColor(useColor);
|
||||
|
||||
Reference in New Issue
Block a user