private static void drawLineCentered(Graphics2D g, double x, double y, double width, double height, double thickness, EffectPainter2D painter) {
    double offset = height - thickness;
    if (offset > 0) {
      y += offset / 2;
      height = thickness;
    }
    drawLine(g, x, y, width, height, painter);
  }
private static void drawLineCentered(Graphics2D g, double x, double y, double width, double height, double thickness, EffectPainter2D painter)