docs: private static void doLayout(
              final Graphics2D graphics2d, final ScalebarAttributeValues scalebarParams,
              final ScaleBarRenderSettings settings) {
          final Dimension maxLabelSize = getMaxLabelSize(settings);
  
          int numSubIntervals = 1;
          if (scalebarParams.subIntervals) {
              numSubIntervals = getNbSubIntervals(
                      settings.getScaleUnit(), settings.getIntervalLengthInWorldUnits(),
                      settings.getIntervalUnit());
          }
  
          settings.setBarSize(getBarSize(settings));
          settings.setLabelDistance(getLabelDistance(settings));
          settings.setLineWidth(getLineWidth(settings));
          settings.setSize(getSize(scalebarParams, settings, maxLabelSize));
          settings.setMaxLabelSize(maxLabelSize);
          settings.setNumSubIntervals(numSubIntervals);
  
          ScalebarDrawer drawer = scalebarParams.getType().createDrawer(graphics2d, settings);
          drawer.draw();
      }