void (@NotNull Graphics2D g, @NotNull Editor editor, @Nullable Color color, @Nullable Color borderColor, int x1, int x2, int y) { int size = (int)JBUIScale.scale(4 * getEditorScale(editor)); if (y < size) y = size; if (ExperimentalUI.isNewUI()) { if (color != null) { g.setColor(color); double width = x2 - x1; RectanglePainter2D.FILL.paint(g, x1, y - size + 1, width, 2 * size - 2, width); } else if (borderColor != null) { g.setColor(borderColor); double width = x2 - x1; RectanglePainter2D.DRAW.paint(g, x1, y - size + 1, width, 2 * size - 2, width); } return; } final int[] xPoints = new int[]{x1, x1, x2}; final int[] yPoints = new int[]{y - size, y + size, y}; if (color != null) { g.setColor(color); g.fillPolygon(xPoints, yPoints, xPoints.length); } if (borderColor != null) { Stroke oldStroke = g.getStroke(); g.setStroke(new BasicStroke(JBUIScale.scale(1))); g.setColor(borderColor); g.drawPolygon(xPoints, yPoints, xPoints.length); g.setStroke(oldStroke); } }