please include function drawThoughtLine. static int drawThoughtArrow_size = 15; static void drawThoughtLineText(BufferedImage bg, BufferedImage img1, int x1, int y1, BufferedImage img2, int x2, int y2, S text) { Graphics2D g = imageGraphics(bg); g.setColor(Color.white); g.setFont(sansSerif(20)); drawTextAlongLine(g, text, x1, y1, x2, y2, drawThoughtLine_width/2+5); g.dispose(); }