void (@NotNull Graphics graphics, int x, int y, int x1, int y1) { if (x == x1) { int minY = Math.min(y, y1); int maxY = Math.max(y, y1); LinePainter2D.paint((Graphics2D)graphics, x, minY + 1, x1, maxY - 1); } else if (y == y1) { int minX = Math.min(x, x1); int maxX = Math.max(x, x1); LinePainter2D.paint((Graphics2D)graphics, minX + 1, y, maxX - 1, y1); } else { LinePainter2D.paint((Graphics2D)graphics, x, y, x1, y1); } }