Skip to content

Commit

Permalink
Revert "fix: border width top/bottom not matching the border radius" (#…
Browse files Browse the repository at this point in the history
…37840)

Summary:
In an effort to fix #37753, this PR reverts the changes introduced by cd6a913 and 1d51032 so border-radius width calculations work as expected

## Changelog:

[ANDROID] [FIXED] - Fix border-radius width calculations

Pull Request resolved: #37840

Test Plan:
Test border colors along with border-radius through RNTester
<img width="538" alt="image" src="https://github.com/facebook/react-native/assets/11707729/4b148d4b-35dc-4737-be00-c5ff156b0865">

Reviewed By: dmytrorykun

Differential Revision: D46684071

Pulled By: cipolleschi

fbshipit-source-id: cf7a80d0d63009b457f03d690b632e332a9b4a02
  • Loading branch information
gabrieldonadel authored and kelset committed Jun 13, 2023
1 parent 0da7e06 commit 0817eaa
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ private void updatePath() {

/** Compute mInnerTopLeftCorner */
mInnerTopLeftCorner.x = mInnerClipTempRectForBorderRadius.left;
mInnerTopLeftCorner.y = mInnerClipTempRectForBorderRadius.top * 2;
mInnerTopLeftCorner.y = mInnerClipTempRectForBorderRadius.top;

getEllipseIntersectionWithLine(
// Ellipse Bounds
Expand All @@ -920,10 +920,7 @@ private void updatePath() {
}

mInnerBottomLeftCorner.x = mInnerClipTempRectForBorderRadius.left;
mInnerBottomLeftCorner.y =
borderWidth.bottom != 0
? mInnerClipTempRectForBorderRadius.bottom * -2
: mInnerClipTempRectForBorderRadius.bottom;
mInnerBottomLeftCorner.y = mInnerClipTempRectForBorderRadius.bottom;

getEllipseIntersectionWithLine(
// Ellipse Bounds
Expand All @@ -949,7 +946,7 @@ private void updatePath() {
}

mInnerTopRightCorner.x = mInnerClipTempRectForBorderRadius.right;
mInnerTopRightCorner.y = mInnerClipTempRectForBorderRadius.top * 2;
mInnerTopRightCorner.y = mInnerClipTempRectForBorderRadius.top;

getEllipseIntersectionWithLine(
// Ellipse Bounds
Expand All @@ -975,10 +972,7 @@ private void updatePath() {
}

mInnerBottomRightCorner.x = mInnerClipTempRectForBorderRadius.right;
mInnerBottomRightCorner.y =
borderWidth.bottom != 0
? mInnerClipTempRectForBorderRadius.bottom * -2
: mInnerClipTempRectForBorderRadius.bottom;
mInnerBottomRightCorner.y = mInnerClipTempRectForBorderRadius.bottom;

getEllipseIntersectionWithLine(
// Ellipse Bounds
Expand Down

0 comments on commit 0817eaa

Please sign in to comment.