void (Graphics g, int x1, int x2, int y) { if (!myPresentation.isVisible()) return; boolean isHovered = myPresentation.isHovered(); y++; // we want y to be line's top position final int gutterWidth = ((EditorEx)myEditor).getGutterComponentEx().getWidth(); int lineHeight = myEditor.getLineHeight(); int interval = getStepSize(lineHeight) * 4; JScrollPane pane = ((EditorEx)myEditor).getScrollPane(); boolean isMirrored = DiffUtil.isMirrored(myEditor); int shiftX = -interval; // skip zero index painting if (isMirrored) { int contentWidth = pane.getViewport().getWidth(); shiftX += contentWidth % interval - interval; shiftX += gutterWidth % interval - interval; shiftX -= getStartPhase(lineHeight, isMirrored); } else { shiftX += -gutterWidth % interval - interval; shiftX += getStartPhase(lineHeight, isMirrored); } shiftX += pane.getHorizontalScrollBar().getValue(); // do not move wave with scrolling String description = myEditor instanceof EditorImpl ? myPresentation.getDescription() : null; if (description != null) { drawWithDescription((Graphics2D)g, x1, y, shiftX, lineHeight, isHovered, (EditorImpl)myEditor, description); } else { draw(g, shiftX, y, lineHeight, isHovered, myEditor.getColorsScheme()); } }