path.addArc(right.getBottomRight().x - corner, right.getBottomRight().y - corner, corner, corner, 270, 90);
path.addArc(right.getTopRight().x - corner, right.getTopRight().y, corner, corner, 0, 90);
} else if (hasAppendageRight) {
// curved line around right(bottom-left) -> right(bottom-right)
int appendageCorner = Math.min(corner, right.width * 2); // adjust for small sizes
path.lineTo(right.getBottomLeft().x, right.getBottomLeft().y);
path.addArc(right.getBottomRight().x - appendageCorner, right.getBottomRight().y - appendageCorner, appendageCorner,
appendageCorner, 270, 90);
} else { // !hasRight
// close curved rectangle around top (bottom-right)
path.addArc(top.getBottomRight().x - corner, top.getBottomRight().y - corner, corner, corner, 270, 90);