Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ private void updatePath() {
}

// Clip border ONLY if its color is non transparent
float pathAdjustment = 0f;
if (Color.alpha(colorLeft) != 0
&& Color.alpha(colorTop) != 0
&& Color.alpha(colorRight) != 0
Expand All @@ -594,6 +595,10 @@ private void updatePath() {
mInnerClipTempRectForBorderRadius.bottom -= borderWidth.bottom;
mInnerClipTempRectForBorderRadius.left += borderWidth.left;
mInnerClipTempRectForBorderRadius.right -= borderWidth.right;

// only close gap between border and main path if we draw the border, otherwise
// we wind up pixelating small pixel-radius curves
pathAdjustment = mGapBetweenPaths;
}

mTempRectForCenterDrawPath.top += borderWidth.top * 0.5f;
Expand Down Expand Up @@ -721,10 +726,10 @@ private void updatePath() {
// (mInnerClipTempRectForBorderRadius), ensuring the border can be
// drawn on top without the gap.
mBackgroundColorRenderPath.addRoundRect(
mInnerClipTempRectForBorderRadius.left - mGapBetweenPaths,
mInnerClipTempRectForBorderRadius.top - mGapBetweenPaths,
mInnerClipTempRectForBorderRadius.right + mGapBetweenPaths,
mInnerClipTempRectForBorderRadius.bottom + mGapBetweenPaths,
mInnerClipTempRectForBorderRadius.left - pathAdjustment,
mInnerClipTempRectForBorderRadius.top - pathAdjustment,
mInnerClipTempRectForBorderRadius.right + pathAdjustment,
mInnerClipTempRectForBorderRadius.bottom + pathAdjustment,
new float[] {
innerTopLeftRadiusX,
innerTopLeftRadiusY,
Expand Down