Skip to content

Commit

Permalink
Native code: Fixed rounded corners off by one calculations
Browse files Browse the repository at this point in the history
Reviewed By: calvano-fb

Differential Revision: D33296166

fbshipit-source-id: 87ba1ef62463b70d7f55f495d18a22c50fdd5d09
  • Loading branch information
oprisnik authored and facebook-github-bot committed Dec 29, 2021
1 parent b7778fc commit 8ffe27e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions native-filters/src/main/jni/filters/rounding_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,16 +402,16 @@ static void addRoundCorner(
centerY = radius;
break;
case TOP_RIGHT:
centerX = w - radius;
centerX = w - radius - 1;
centerY = radius;
break;
case BOTTOM_RIGHT:
centerX = w - radius;
centerY = h - radius;
centerX = w - radius - 1;
centerY = h - radius - 1;
break;
case BOTTOM_LEFT:
centerX = radius;
centerY = h - radius;
centerY = h - radius - 1;
}

if (radius < 1) {
Expand Down

0 comments on commit 8ffe27e

Please sign in to comment.