void (Graphics2D g, int width, int height, float arc, float bw, boolean symmetric) { float f = UIUtil.isRetina(g) ? 0.5f : 1.0f; float lw = UIUtil.isUnderDefaultMacTheme() ? JBUIScale.scale(f) : LW.getFloat(); g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, MacUIUtil.USE_QUARTZ ? RenderingHints.VALUE_STROKE_PURE : RenderingHints.VALUE_STROKE_NORMALIZE); float outerArc = arc > 0 ? arc + bw - JBUIScale.scale(2f) : bw; float rightOuterArc = symmetric ? outerArc : JBUIScale.scale(6f); Path2D outerRect = new Path2D.Float(Path2D.WIND_EVEN_ODD); outerRect.moveTo(width - rightOuterArc, 0); outerRect.quadTo(width, 0, width, rightOuterArc); outerRect.lineTo(width, height - rightOuterArc); outerRect.quadTo(width, height, width - rightOuterArc, height); outerRect.lineTo(outerArc, height); outerRect.quadTo(0, height, 0, height - outerArc); outerRect.lineTo(0, outerArc); outerRect.quadTo(0, 0, outerArc, 0); outerRect.closePath(); bw += lw; float rightInnerArc = symmetric ? outerArc : JBUIScale.scale(7f); Path2D innerRect = new Path2D.Float(Path2D.WIND_EVEN_ODD); innerRect.moveTo(width - rightInnerArc, bw); innerRect.quadTo(width - bw, bw, width - bw, rightInnerArc); innerRect.lineTo(width - bw, height - rightInnerArc); innerRect.quadTo(width - bw, height - bw, width - rightInnerArc, height - bw); innerRect.lineTo(outerArc, height - bw); innerRect.quadTo(bw, height - bw, bw, height - outerArc); innerRect.lineTo(bw, outerArc); innerRect.quadTo(bw, bw, outerArc, bw); innerRect.closePath(); Path2D path = new Path2D.Float(Path2D.WIND_EVEN_ODD); path.append(outerRect, false); path.append(innerRect, false); g.fill(path); }