@Override
  Point getPosition() {
    int visualLine = myEditor.offsetToVisualLine(getOffset());
    int[] yRange = myEditor.visualLineToYRange(visualLine);
    List<Inlay<?>> allInlays = myEditor.getInlayModel().getBlockElementsForVisualLine(visualLine, myShowAbove);
    int y;
    if (myShowAbove) {
      y = yRange[0];
      boolean found = false;
      for (Inlay<?> inlay : allInlays) {
        if (inlay == this) found = true;
        if (found) y -= inlay.getHeightInPixels();
      }
    }
    else {
      y = yRange[1];
      for (Inlay<?> inlay : allInlays) {
        if (inlay == this) break;
        y += inlay.getHeightInPixels();
      }
    }
    return new Point(myEditor.getContentComponent().getInsets().left, y);
  }
@Override
  Point getPosition()