protected Insets getShapedBorderInsets(Component c) {
    return new Insets(1,
                      (isBottomLeftRounded(c) ? 4 : 1) +
                      (topLeftRounded ? (leftSlope <= 0.5f ? 4 : 1) : 0) +
                      (int) (leftSlope * leftHeight),
                      drawBottomLine ? 1 : 0,
                      (bottomRightRounded ? 4 : 1) +
                      (topRightRounded ? (rightSlope <= 0.5f ? 4 : 1) : 0) +
                      (int) (rightSlope * rightHeight));
  }