code: @VisibleForTesting
      protected static int getBarSize(final ScaleBarRenderSettings settings) {
          if (settings.getParams().barSize != null) {
              return settings.getParams().barSize;
          } else {
              if (settings.getParams().getOrientation().isHorizontal()) {
                  return settings.getMaxSize().height / 4;
              } else {
                  return settings.getMaxSize().width / 4;
              }
          }
      }
docs: Get the bar size.
  
  @param settings Parameters for rendering the scalebar.