Consumer<Graphics2D> draw(float x, float y, int startRelativeOffset, int endRelativeOffset) {
      if (myDelegate != null) {
        return myDelegate.draw(x, y, startRelativeOffset, endRelativeOffset);
      }
      else if (myFoldRegion != null) {
        LineLayout foldRegionLayout = myView.getFoldRegionLayout(myFoldRegion);
        return g -> {
          int relativeOffset = 0;
          for (LineLayout.VisualFragment fragment : foldRegionLayout.getFragmentsInVisualOrder(x)) {
            int relativeOffsetEnd = relativeOffset + fragment.getLength();
            if (relativeOffset < endRelativeOffset && relativeOffsetEnd > startRelativeOffset) {
              fragment.draw(fragment.getStartX(), y,
                            Math.max(0, startRelativeOffset - relativeOffset),
                            Math.min(relativeOffsetEnd, endRelativeOffset) - relativeOffset).accept(g);
            }
            relativeOffset = relativeOffsetEnd;
          }
        };
      }
      return g -> {};
    }
Consumer<Graphics2D> draw(float x, float y, int startRelativeOffset, int endRelativeOffset)