Skip to content

Commit

Permalink
fix(android): draw outer border path correctly (#11888)
Browse files Browse the repository at this point in the history
Co-authored-by: Gary Mathews <contact@garymathews.com>
  • Loading branch information
build and garymathews committed Aug 10, 2020
1 parent 0c9e706 commit e8c6d54
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -77,9 +77,9 @@ protected void onDraw(Canvas canvas)
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// Set specified border corners.
outerPath.addRoundRect(innerRect, innerRadius, Direction.CW);
outerPath.addRoundRect(innerRect, innerRadius, Direction.CCW);
} else {
outerPath.addRoundRect(innerRect, innerRadius[0], innerRadius[0], Direction.CW);
outerPath.addRoundRect(innerRect, innerRadius[0], innerRadius[0], Direction.CCW);
}
Path innerPath = new Path(outerPath);

Expand All @@ -88,7 +88,7 @@ protected void onDraw(Canvas canvas)
// Set specified border corners.
outerPath.addRoundRect(outerRect, this.radius, Direction.CW);
} else {
outerPath.addRoundRect(outerRect, this.radius[0], this.radius[0], Direction.CCW);
outerPath.addRoundRect(outerRect, this.radius[0], this.radius[0], Direction.CW);
}
canvas.drawPath(outerPath, paint);

Expand Down

0 comments on commit e8c6d54

Please sign in to comment.