void (Graphics2D g, boolean vertical, double centerX, double centerY, double width, double strokeWidth) { double length = width - getSquareInnerOffset(width) * 2; Line2D line = LinePainter2D.align(g, EnumSet.of(LinePainter2D.Align.CENTER_X, LinePainter2D.Align.CENTER_Y), centerX, centerY, length, vertical, StrokeType.CENTERED, strokeWidth); LinePainter2D.paint(g, line, StrokeType.CENTERED, strokeWidth, RenderingHints.VALUE_ANTIALIAS_OFF); }