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 facebook-github-bot committed Jun 13, 2023
1 parent 3006a33 commit 9c9945a
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ private void updatePath() {

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

getEllipseIntersectionWithLine(
// Ellipse Bounds
Expand All @@ -917,10 +917,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 @@ -946,7 +943,7 @@ private void updatePath() {
}

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

getEllipseIntersectionWithLine(
// Ellipse Bounds
Expand All @@ -972,10 +969,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 9c9945a

Please sign in to comment.