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